Original article: Visual Studio unit test 6-UI Interface Test
The UI test is actually a process of recording operation path (mapping) and restoring the operation order by path. This method is also applicable to both winform and webform. The following uses winform as an example to describe how to record a video.
1. Create a coded UI Test
2. Select recording.
3. uimap will appear in the lower-right corner of the screen.
4. Open a winform and use the "view UI control properties" function to view the properties of the selected control.
5. Click red to start recording, and then perform some operations on the tested winform program. After the operation, you can pause recording and view the recorded operation process and operation data. As shown in:
6. Click Generate code. The system will automatically generate the following operation code.
7. re-open the winform program under test, select the generated codeduitestmethod1 method in test List editor, and execute it. The tested winform program automatically performs all the operations recorded just now.
So far, a simple winform unit test is complete. The webform recording process is the same as that of winform. Note that you must open the test website before recording. You cannot open only IE.
The Visual Studio 2010 unit test series have all been completed. For your convenience, please use the testing.
If you need to reprint, please indicate the original from the wolf's blog: http://blog.csdn.net/tjvictor
Visual Studio unit test 6-UI Interface Test