DCSIMG
VS2010 – Coded UI Test - Shai Raiten

Shai Raiten

 Subscribe

VS2010 – Coded UI Test

VS2010 – Coded UI Test

One of the most exciting features in Visual Studio 2010 is CodedUITest.

CodedUITest allows you to record screen actions to perform UI Testing.

Open visual studio 2010 and create new test project, add new CodedUITest.

image

CodedUITest appears and you can pick how do you want to record your test, in this post I'll demonstrate how to record CodedUITest using the Recorder.

Coded-1

CodedUITest recorder window appears.

Click "Record Actions" to start recording the test.

 Coded-2

In my demo I open calc and perform couple of simple actions.

After you finish recording give your CoedeUITest name and click "Generate Method" .

 Coded-3

 

Before you run the test you want to add validation rules for your CodedUITest.

Enter the "Add Assertions" tab click "Add UI Control".

Coded-5

 

Now drag the crosshair over the control you wish to create validation.

 

Coded-6

And click show properties , to view the selected control properties.

 Coded-7

Now you can see all values related to the select control, mark the values you want to validation and set the right comparator and value.

 Coded-8

After clicking ok you will see the validation inside the "Add Assertions" tab.

 Coded-9

Now close the CodedUITest window and from Test View window run your CodedUITest.

Enjoy.

Comments

Deepak said:

Is there any way that I run the test cases from the command line instead of Test List Editor/Visual Studio IDE?? Thanks...

# May 31, 2009 5:45 AM

shair said:

Hi,

You can run test from command-line using MSTest.exe

msdn.microsoft.com/.../ms182489(VS.80).aspx

# June 3, 2009 3:17 PM

Shai Raiten said:

Sigist 2009 – The Rise Of QA (Microsoft Test & Lab Manager) Today I had the honor to present Microsoft

# July 29, 2009 10:29 PM

Manuel Lopez said:

Did you have a sample for VS2010 using mock

# October 4, 2009 7:46 PM

Poonam said:

Please tell me how do you pass parameters to the method.

# November 27, 2009 3:31 PM

Shai Raiten said:

Team System 2010 Beta 2 – Diagnostic Data Adapters – Create Custom Adapter – Part 1 In my previous post

# January 11, 2010 12:46 PM

Shai Raiten said:

VSTS 2010 Beta 2 – Diagnostic Data Adapters – Create Custom Adapter – Part 1 In my previous post I’ve

# January 11, 2010 12:54 PM

Bharat said:

How to add custom field in test case (i means to say in my project i have written some test case but i need to add some column in test case ) so how should be procceed further???

# March 19, 2010 6:47 AM

kumar said:

Pls tell me..Can ve do the Page load test(Load testing)

# June 28, 2010 9:55 AM

Shai Raiten said:

Coded UI Test – Tip 2 – Assertions Visual Studio 2010 comes with many new features not just to developers

# July 18, 2010 9:05 AM

Bibhabasu Prusty said:

i am trying to add an existing recording by selecting an work item id in "Work item Picker".The "OK" button is not getting enabled.Please let me know the problem.WE were able to do that yesterday.

# August 27, 2010 10:16 AM

shair said:

Hi,

The Work Item must to be of Test Case item with Automation saved inside.

# September 2, 2010 2:19 PM

Ashu said:

Not able to see the above emplate in my VS 2010. In my "Test projects" there is only one template i.e. "Test project"

# January 14, 2011 7:38 AM

Using the Save File Dialog in Silverlight « Dot Net Solutions said:

Pingback from  Using the Save File Dialog in Silverlight « Dot Net Solutions

# June 2, 2011 3:32 PM

Abhishek said:

Hi Shai,

I am working on CODED UI Test on VS 2010 Ultimate. I have recorded some actions and they are running fine with VS 2010. Now I have added a form to this progect and a button on the form. Now I am targetting to do the following

1) I am trying to call these actions on the click event of this button  and

2) Create an executable so that I can run the same recorded actions on other machine not having VS 2010 istalled with the click of the button.

Please help.

# October 6, 2011 3:47 PM

shair said:

# October 7, 2011 12:14 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: