why are the Uitest files empty?

Nov 7, 2011 at 7:13 PM

browsing through the solutions and wondering why are the Uitest files in the acceptance test solution are empty?

 

thx,

Clemens

Developer
Nov 8, 2011 at 5:39 PM

Clemens,

As you can check in the following article from MSDN, Visual Studio 2010 Ultimate and Premium provide the possibility of testing the user interface, through automated UI tests:

As explained in this article (Anatomy of a Coded UI Test), the .uitest file "(...)is an XML file that represents the structure of the coded UI test recording and all its parts. These include the actions and the classes in addition to the methods and properties of those classes. The UIMap.Designer.cs file contains the code that is generated by the Coded UI Builder to reproduce the structure of the test and provides the connection to the testing framework."

Both the UIMap.uitest and UIMap.Designer.cs files are not editable. However, the UIMap.cs class (for example the FillupPage.cs file inside the UIMaps folder in the MileageStats RI acceptance tests) is editable. This sounds like a good reason to place the logic of the coded ui test in that file, which is what was done in the MileageStats RI, leaving both the UIMap.uitest and UIMap.Designer.cs empty.

I hope you find this helpful.

Guido Leandro Maliandi 
http://blogs.southworks.net/gmaliandi

Nov 9, 2011 at 11:49 AM

As I understand it correct, you are creating the UIMap (with the UI Builder), generate the code in the UIMap.Designer.cs, copy past this generated code to the UIMap.cs file and empty the UImap,uitest file ... this looks strange for me. Why not using the partial class capabilities, so you still can us the UI builder capabilities?

 

thx,

Clemens

Developer
Nov 9, 2011 at 12:47 PM

Clemens,

This seems to be done to avoid the generated code being replaced each time a new method is recorded, as explained in the Silk documentation. If you believe this decision is unappropriate, you can create a work item in the issue tracker, so as the Silk team considers it for future releases.

Thanks,

Guido Leandro Maliandi 
http://blogs.southworks.net/gmaliandi

Coordinator
Nov 10, 2011 at 7:33 PM

FYI. Project Silk's Test Lead is currently in discussions with the Coded UI team to see if we can do a better job of explaining why we took the route we did. We'll update this thread afterwards. Thanks.