Sunday, April 26, 2015

Coded UI 2013 Default File Structure

Coded UI 2013 Default File Structure
Coded UI maintains a specific or default file structure as follows: 
·         CodedUITest.cs file
·         UIMap.uitest file
·         UIMap.Designer.cs file
·         UIMap.cs file











CodedUITest.cs file: 
CodedUITest.cs file is a unit test file having Test Class decorated with [CodedUITest] attribute and contains multiple methods decorated with [TestMethod] attribute.

UIMap.uitest file: 
UIMap.uitest is an xml file containing all the windows, controls, properties, methods, actions and assertions etc used for playback.

UIMap.Designer.cs file: 
UIMap.Designer.cs file is a partial class which contains the classes for various controls and their fields, properties and methods.

UIMap.cs file: 
UIMap.cs is also a partial class of UIMap.Designer.cs. It can contain all the recorded methods which need customization. 

1.         Open Visual Studio 2013 and create a new Test Project and a new CodedUI Test.
2.         Click on OK button.

         
















A new Coded UI Project gets opened. 














Coded Ui Test Builder Options
















  • “Record actions edit UI map or add assertions” option allows you to do the recording on your application      and then generates code for the recording. 
  • “Use an existing action recording” allows the code generation for already recorded action. 
3. Select the first option “Record actions edit UI map or add assertions”. It will open the Coded UI Test builder for creating the recording.


Click on the left most red button for recording, the icon will change to pause/stop button as shown below.


No comments:

Post a Comment