Introduction to VSTS-CUIT: coded UI test Builder

Source: Internet
Author: User

Coded UI test builder is a very important part of cuit: if you use the recording method to generate the script, it will always be with you; if you use the pure code method to write the script, she is also a good helper to help you find the attributes of the identifier control.

 

You can call up the window in two ways:

1. vsts menu bar test-> generate code for coded UI test-> use coded UI test builder...

2. right-click a coded UI test method marked with the [testmethod] property, right-click anywhere, right-click the menu-> generate code for coded UI test-> use coded UI test builder...

 

We recommend you use 2nd methods. Here, vsts seems to have a small bug (Version: 10.0.30319.1 remrel ):

 

The generate code for coded UI test menu item cannot be activated immediately under the test menu in the vsts menu bar

Bytes --------------------------------------------------------------------------------------------------------

Step 1: Click the coded UI test method without the [testmethod] attribute, right-click it, and confirm that the menu bar does not contain generate code for coded UI test;

Step 2: In the vsts menu bar, you can click "test" without the generate code for coded UI test item;

Step 3: move the cursor to the coded UI test method marked with the [testmethod] property. On the vsts menu bar, click the test menu and the generate code for coded UI test is still unavailable;

Step 4: move the cursor to the coded UI test method marked with the [testmethod] property, right-click it, and right-click the generate code for coded UI test item on the menu bar;

Step 5: Return to the vsts menu bar. The generate code for coded UI test item appears under the test menu.

 

 

Note the following points for coded UI test builder:

1. Some controls can be displayed only when you move the mouse over them. For such controls, you need to use the Windows key + I combination to locate them;

2. After locate to a control, a navigation key is displayed at the top of the pop-up property box. The hierarchical result tree of the control can be obtained through the control;

3. When selecting the unique identifier of a control, the attribute under the search category is preferred;

4. Identify the properties of the control. The more the control, the better it is. In this case, the control cannot be found for the name + classname attribute, but the control can be found only by using the name attribute instead of the classname attribute.

 

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.