Objective
I saw it in the lab. Visual Studio Ultimate 2012: Easily test the user interface with coded UI tests after this video, try it, feel very new, share the experience. Video address is http://s.ch9.ms/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview-CHS/ Visual-studio-ultimate-2012-easily-testing-user-interfaces-with-coded-ui-tests-chs
UI Test
the way you interact with a software program is called a user interface or UI. Almost all software has a UI, so it is necessary to do UI testing of the software. The content and main points of the UI test on the Internet are similar, the basic emphasis is that the design of the UI should conform to the humanized design, need to meet the needs of people correctly and easy to operate, and the interface is intuitive and tidy. "Software Testing" has defined a good UI should have the following 7 elements: standards and norms, intuitive, consistent, flexible, comfortable, correct, practical. The details of the UI tests in http://blog.csdn.net/bingjingfan/article/details/6222753 also follow the main thrust.
Automated testing
Automated testing is the automation of software testing. Save labor, time, or hardware resources and improve test efficiency by providing more efficient means than manual testing. Coded UI tests in Visual Studio are one of the automated tests. However, tools can only make the job easier and the quality of the work results higher, software testing tools can not replace software testers, and can only help software testers to work better.
Simple example--editboxing
1. New Project
Selecting a Coded UI test project
Select Record Action, edit UI map, or add assertion (R)
When you click OK, the following coded UI Test builder appears:
When the input in 2.EditBoxing is empty
Click "Submit", pop up the Prompt box, click "OK", the notification box disappears, can be entered again in editboxing:
Recording action (click the button on the UI Test Builder, or alt+r):
Enter empty, then click "Submit", pop up the box, end the recording, then click Generate Code (ALT+G):
To add an assertion:
Visual Studio will recognize the contents of the popup box
In the list of properties for the identified object above, select the Exists property and add the assertion. This property indicates that when it is true, it is present, and when it is false, there is no
When we test, the test passes if the object is present.
Generate code for the assertion you just generated, click Generate code
2. Click Run To test
To run tests from Test Explorer:
The test results are as follows:
Coded UI tests in software Test Visual Studio