Saturday, May 2, 2015

Ordered Tests In Coded UI

Ordered Tests: Setting Up Your Test Run Sequence

An ordered test contains other tests that are meant to be run in a specified order. An ordered test is displayed as a single test in Test Explorer. Its results appear in a single row in the Test Results window, but you can obtain individual results for each test that was run as a part of the ordered test.
An ordered test is a container that holds other tests and guarantees that tests run in a specific order.

To create an ordered test


1.      In Solution Explorer, open the short cut menu on a unit test project or a coded UI test project, choose Add, and then choose Ordered Test.
The ordered test opens in the main document editing window. You will use this window to select and include tests in the new ordered test.
2.      (Optional) Change the selection of tests to choose from. Choose the down arrow under Select project to view tests, and then choose the test project in your solution.
3.      Under Available tests, choose a test to select it. You can select multiple tests by using SHIFT+click and CTRL+click.
4.      To move the test or tests into the ordered test, choose the right arrow.
5.      To remove a test from the ordered test, choose the test in the Selected tests pane and then choose the left arrow. To remove multiple tests at one time, select them by using SHIFT+click or CTRL+click, and then choose the left arrow.
6.      (Optional) Re-order the tests within the ordered test by choosing a test in the Selected tests pane and then choosing the up or down arrow. To re-order multiple tests at one time, select them by using SHIFT+click or CTRL+click, and then choose the up or down arrow.
7.      Checking Continue after failure means that the ordered test will run regardless of the failure of one or more tests. Leaving Continue after failure unchecked means that the ordered test will stop running after the first occurrence of a test failure.

The ordered test is ready to run:

  •  Create Ordered Test


  • Select Test Methods


  • Select Run All 


  • Select Run Selected Tests


2 comments:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Online Training from India. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.
    JavaScript Online Training from India

    ReplyDelete