Sunday, 24 June 2012

Visual Studio 2010 Coded UI


A coded UI test class is identified by a CodedUITestAttribute applied to the class.
Each coded UI test is a test method in a coded UI test class. You can add multiple test methods to each coded UI test class and identify each coded UI test method by using the TestMethodAttribute.
Your test method can also add validation code for a UI test control to obtain the value of a property of a UI test control. The test method can use an Assert statement to compare the actual value of the property to an expected value. The result of this comparison determines the outcome of the test. Every time that you run a coded UI test, you can analyze the test result and if the test fails, you can see or store the details of which assertion failed.
When you create a coded UI test, these files are added to your test project:
File Description
CodedUITest1.cs Contains the coded UI test class, test methods and assertions.
UIMap.uitest Contains the XML model for the UIMap class, including all windows, controls, properties, methods, parameters, actions, and assertions.
UIMap.Designer.cs Contains the code representation of the XML contained in the UIMap.uitest file. Do not edit this file.
UIMap.cs Contains more of the code for the UIMap class. You can put any customizations for the UI map in this file.
These assemblies are added as references to your test project:
  • Microsoft.VisualStudio.QualityTools.CodedUITestFramework
  • Microsoft.VisualStudio.QualityTools.UnitTestFramework
  • Microsoft.VisualStudio.TestTools.UITest.Common
  • Microsoft.VisualStudio.TestTools.UITest.Extension
  • Microsoft.VisualStudio.TestTools.UITesting

No comments:

Post a Comment