Skip to content

Crazy blog

No money, no honey, no funny…

1. Open Visual Studio 2010

2. File > New Project > Visual C# > Test > Test Project

3. Delete the UnitTest1.cs file and add a Coded UI Test by right clicking on the Project Name -> Add -> New Test

4. Add new TestMethod, then right click, choose Use Coded UI Test Builder

5. Record your test and then click Generate Code

6. Name your code then click Add and generate button

7. Run the test by placing the cursor in the function, right click in the method and click “Run Tests”

8. Finish

9. Please careful when try to edit UIMap.Designer.cs and UIMap.uitest.

File Description Can this be edited?
GMailTest.cs The default name for the file is CodedUITest1.cs. This is the file in which all the Test Methods are added. YES
UIMap.uitest An XML file has all the information about the recording including actions, objects and data. NO today. In future, we may have editor for this file.
UIMap.Designer.cs This file contains the code generated by the tool based on the recording in UIMap.uitest file (a.k.a. code behind file). NO. Any edits to this will be lost.
UIMap.cs The main class generated by the tool is UIMap. This is partial class and is split into UIMap.Designer.cs  and UIMap.cs. While UIMap.Designer.cs contains code generated by the tool and should not be edited, the UIMap.cs file is the place where you would place all your customization. More on this later. YES


%d bloggers like this: