How to create a parameterized test case in Microsoft Test Manager

Parameterized test cases save your time and effort on testing the same functionality with different test data.

Let me take a simple example to explain this. Assume you have to test the ‘cutting’ functionality of a knife on three different ingredients. First thing it will come to your mind is that there will have to have three test cases to test the primary functionality of it. But no, you can cover all three in one test case if you use parameter values in TMT.

Create a test case with parameter values

To insert parameter values you can user the highlighted option as in Figure 1

1

Figure 1

Once you insert a parameter, it will appear a table to specify required parameter values as in the Figure 2

2.PNG

Figure 2

Once you define parameter values and save the test case, you can start test case execution for the created parameterized test case.

3

Figure 3

Run parameterized test case

When you start executing the test case it will show you iterations as in Figure 4.

4

Figure 4

By clicking on the ‘Next’ button next to the iteration, you can proceed to the next iteration.

6

Figure 5

If at least one iteration is failed the whole test case would get saved as failed. Figure 6

7

Figure 6

You can also use multiple parameters in the same test case.

This way MTM will minimize your time and the effort need in creating test cases.