How to: Add Parameters to a Manual Test Case To Run Multiple Times with Different Data
If you want to run a manual test case multiple times with different data, you do not have to create multiple copies of the test case. You can add parameters to the actions or expected results for any test step in your test case. Then you can add multiple sets of values for the parameters that you want to use in your test. Each set of values for the parameters is run as an individual iteration of the test using Test Runner. You can copy the value of each parameter when you run the test and then paste the value into your input field in your application under test.
You can insert a parameter into the action or expected result of a test case as shown in the following illustration. You can also rename or delete parameters in your test case. If a set of data is no longer required, you can delete that data iteration from your test case.
The results of each iteration are recorded and saved as part of the test result, as shown in the following illustration. The test result is based on the outcome of all the iterations. If all the iterations are marked as passed then the test outcome is passed. If any one of the iterations fails then the test outcome is failed.
Use the following procedure to insert, delete, or rename parameters and add the values for the parameters.
To insert, delete, or rename parameters and add the values for the parameters
Open Microsoft Test Manager.
To display the Microsoft Test Manager window, click Start, and then click All Programs. Point to Microsoft Visual Studio 2010 and then click Microsoft Test Manager 2010.
From the Testing Center, click Plan and then click Contents.
The Contents pane is displayed.
Select the test suite in the test suite hierarchy pane that contains the manual test case that you want to run multiple times.
The list of tests in the test suite is displayed.
To open the test case, double-click the test case.
Click where you want to insert your parameter in either Action or Expected Result. Then click Insert parameter.
The Insert Parameter dialog box is displayed.
Type the name of your parameter and then click Insert parameter.
The parameter is displayed in the test step preceded by @.
The column to add the parameter values for this new parameter is displayed underneath the test steps in Parameter Values.
Repeat steps 5 to 7 to add all the parameters that you require for this test case.
To add the values for the parameters, click one of the columns for the parameters.
A new row is displayed to use to add a set of parameter values.
Type the values for all your parameters.
(Optional) To enter another iteration for your test, click Enter.
Another row is displayed to add another set of parameter values.
(Optional) To delete a parameter from your test case, click the parameter in one of the rows in Parameter Values and then click Delete parameter.
The Delete parameter dialog box is displayed. You can replace the parameter with a fixed value or just remove it from your steps.
(Optional) To rename a parameter in your test case, click the parameter in one of the rows in Parameter Values and then click Rename parameter.
The Rename parameter dialog box is displayed. You can then change the name of your parameter throughout your test case.
(Optional) To delete an iteration, right-click the row of data in Parameter Values for the iteration you want to remove and then click Delete iteration.
To save the parameters and values that you have added to the test case, click Save in the toolbar.
To run the iterations for this test using the parameter values that you have entered, click Test to view the Test activity and click Run Tests. Select the test case with parameters and click Run.
Test Runner is started and your test and the iterations are displayed. You can paste the parameter values for each iteration into your application under test as you run each test step.
For more information about how to run the test, see How to: Run Multiple Iterations of a Test Using Different Data Parameters. To view the test results, see How to: View Test Results Using Microsoft Test Manager.