Coded UI tests
The Automated UI testing feature in Visual Studio 2012 makes it easy to test the UI capabilities of your application to help you complete coded UI tests.
A. New Coded UI test project
In Visual Studio 2012, click on New project, File --, select C # in Other languages , click Test, and select the Coded UI test project Click OK.
Ii. Recording UI test actions
After you create a new test project, you select the recording operation, and the coded UI Test builder appears:
To record after:
Click "Start Recording" to open the browser, this opens the http://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/ Testing-windows-store-applications, click Play Video, then click Production Code, named "Play";
Click on "Continue recording", click the Pause button, click the Generate code again, named "Pause";
Click "Continue recording", click the Settings button, click the Production code again, named "Setting";
Click "Continue recording", click the Full Screen button, click the Generate code again, named "Fullscreen";
Finally, close the Test builder, and the auto-generated code appears in VS
To open Uimap.uitest, you can edit previously recorded actions:
Third, run the test
Click Run all tests, VS will automatically run the recorded UI test items.
Software Test Learning Note Week 5---UI testing with Visual Studio 2012