Sunday 13 July 2014

Creating Ordered tests in CUIT

Executing the automated test scripts in Batch. In CodedUI  we can create and execute the batch of Unit tests using Ordered test.

To create ordered test please follow the below steps:

1. Open CodedUI TestProject.
2. Click on Test tab >> New test.



3. Select Ordered Test 


-- We can give name to ordered test in Test name text box and click on OK button.

4.Then we need to select the unit test from list of available tests in the project.



5. In the Left side pane we can see the available tests.Either by double click on individual test or by selecting test and then click on ">" button will add the test to the ordered test list.To remove the test from "selected tests"- select the test from "selected tests"  list click on "<".



6.Now the very important point is to check the "continue after failure"checkbox.This ensures that if any test get failed during the ordered test execution, then the next test will be executed from the selected list.e.g In given example if "checkAddition.." test fails then the "CheckMultiplication.." will be executed. 



7. Now click on Save icon to Save the ordered test.


8. Now click on Run test and then results will be generated.
To Execute ordered test click on Test >>Windows>>Test List Editor



9. select the ordered test from the list and click on Run ordered test icon. OR by right click on the selected ordered test and select "Run checked tests"




10. The result will be shown as below:


No comments:

Post a Comment