Visual Studio unit test 6-UI Interface Test

Source: Internet
Author: User
Tags visual studio 2010

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.