VSTS-CUIT: Initial Experience

Source: Internet
Author: User

Not every vsts edition has the coded UI test function. Because we don't need to consider the budget issue, we use the Ultimate Edition directly, find a link on Microsoft's website to compare functions of different versions:

Ref: http://www.microsoft.com/visualstudio/en-us/products#compareTable

 

After the ultimate version is installed, the vsts Program Group has two more options than the previous vs version: Team Foundation server tool and Microsoft test Manager 2010, both are related to TFs.

 

Open vsts 2010 and create a test project. By default, the file unittest1.cs is used instead of the coded UI test template.

 

After creating a coded UI test, you will feel that the coded UI test is basically the same as the unit test organization.

 

 Namespace testproject1 <br/>{< br/> /// <summary> <br/> // summary description for codeduitest1 <br/> /// </Summary> <br/> [codeduitest] <br/> public class codeduitest1 <br/>{< br/> Public codeduitest1 () <br/>{</P> <p >}</P> <p> [testmethod] <br/> Public void codeduitestmethod1 () <br/>{</P> <p >}</P> <p> # region additional test attributes </P> <p> // use testinitialize to run code before running each test <br/> [testinitialize ()] <br/> Public void mytestinitialize () <br/>{</P> <p >}</P> <p> // use testcleanup to run code after each test has run <br/> [testcleanup ()] <br/> Public void mytestcleanup () <br/>{</P> <p >}</P> <p> # endregion </P> <p> // <summary> <br/>/ // gets or sets the test context which provides <br/> // information about and functionality for the current test run. <br/> // </Summary> <br/> Public testcontext <br/> {<br/> Get <br/>{< br/> return testcontextinstance; <br/>}< br/> set <br/>{< br/> testcontextinstance = value; <br/>}< br/> private testcontext testcontextinstance; <br/>}< br/>}

 

 

Test property comparison for MS unit test, coded UI test, nunit:

Unit Test Coded UI Test Nunit
Testclass Codeduitest Testfixture
Classinitialize X? Testfixturesetup
Testinitialize Testinitialize Setup
Testmethod Testmethod Test
Testmethod Testmethod Test
Testcleanup Testcleanup Teardown
Classcleanup X? Testfixtureteardown

 

However, since unit test is a code test, coded UI test is a test at the User Function/interface level. Its specific applications will certainly be somewhat different.

 

 

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.