Repeat a test with different data
When you write a manual test, you often want to specify that the test should be repeated several times with different test data. For example, if your users can add different quantities of a product to a shopping cart, then you want to check that a quantity of 2 or 3 works just as well as a quantity of 1.
To do this, you insert parameters in your test steps. Along with the test steps, you provide a table of parameter values.
When you run a test case with parameters, test runner shows the first row of parameter values.
When you’ve completed the steps, mark the test passed or failed.
Then go on to the next iteration of the test, which uses the next row of parameter values.
Some of the parameter values are wrong. Can I fix them without canceling the test?
Yes. Choose Edit from the context menu of the step.
If you marked any test iteration as failed, then the outcome of the whole test is shown as failed.
If you inspect the test results in Microsoft Test Manager, you can see the different results for each iteration:
It can be error-prone and tedious to work through a long table of parameter combinations. To speed things up, create an action recording when you run the test with the first set of parameter values, and then play it back for the other sets.
Select Create action recording before you press the Start button.
Complete the first test iteration and move on to the next.
Mark each step as passed or failed as you work. Enter parameter values in the application exactly as they are displayed in the test script.
Choose Play to run the test with the next set of parameter values.
Your actions will be played back automatically, but you still have to verify the results.
Record/playback doesn’t work with all applications. For details, see Supported Configurations and Platforms for Coded UI Tests and Action Recordings.