Today we have implemented a coded UI test Project , and here are the procedures that I tested:
1. New Test Project
In Visual Studio (the version I used is Update2) click on New project, File --, select " Coded UI test Project ", and in the dialog box select " Record action, Edit the UI map or add an assertion "and click ok ."
2, recorded a series of operations
After completing the above steps, vs minimized, the coded UI test builder appears:
The left-to-right button is: start/Pause recording, edit, add assertion, generate code ;
To record after:
Click "Start Recording", open the browser, and then click "Generate Code", named "Openpage";
Click "Start Recording", click on the "Video" button on the homepage (www.baidu.com), click "Generate Code", named "Clickbutton";
Click "Start Recording", close the browser, and then click "Generate Code", named "Closepage";
Close the generator, the VS2013 appears, and the generated code appears:
To open Uimap.uitest, you can edit previously recorded actions:
3. Run the test
run The test and you can see the previously recorded action, showing that the run was successful .
This is the simplest of several operations, so in the next blog post, I will record more actions, such as adding assertions, selecting hidden controls, using keyboards and so on, hoping that interested friends can communicate with me more ~
Coded UI test Project--visual Studio 2013