Tuesday, May 3, 2011

How to create coded UI testing using Visual Studio 2010.

This is very simple process. But most of the people over complicated by using different methods as well as think this very similar to coding.  Let’s begin the process.
To do coded UI testing you need Microsoft Visual Studio Ultimate or Premium.  This mandatory, there is no exception for this.  Below link will help you further infroamtion.
 Follow the steps you will create you’re first Coded UI project.

1.       Open the Microsoft Visual Studio Ultimate or Premium.
Click  File->New->Project
2.        Then you will get New project screen,
FYI : you can either choose any language( c#, VB, etc..)  Whatever language you are comfortable.

When you choose the language you will able to see different templates,, one of the templates is “Test”   choose that template.  Type the name of the Project and Path

3.       Once you created project you will see the solution explorer, you will able to see project name and references. Also bottom you will see the Unit Test1 that class actually doesn’t need at all.



4.       Go to the project and click right hand button then click “Add” bottom of the application you will see “Coded UI Test”.

5.Once you finish adding the Coded UI class, you will see another screen will show the information regarding the “Generating Code for Coded UI Test”
  •    Record actions, UI map or add assertions - This allows to generate the code according to new actions.
  •   Use an existing recording - This allows to generate the code recorded action through Microsoft Test Manger.

6. I am using first option assuming I dont have any actions already recored using Microsft Test Manger. This sceanrio when  you click "OK".

You will get folowing screen with "UIMap-Coded UI Test Builder"

                       

7. Know you click the record button and sart to record youre actions.
  

No comments:

Post a Comment