I’ve been asked by a few customers about this topic in the past week, so I thought I’d generalize my response into this post. I hope others will find this helpful as well!
Sometimes when building a test case in Microsoft Test Manager or Web Access, you will have a test step with more than one expected result. Perhaps you need to verify several fields on a form, or that multiple things happen as a result of your action.
If you encounter this scenario from time to time, you can handle it a couple different ways.
Using this very generic example (you may or may not recognize this test case from my previous blog post):
Note that step 2 has two expected results.
Single-step, multiple expected results, single pass/fail
As-is, you can run this test case without issue. The small challenge with this is handling a failure with one expected result and a pass with another. Is the step a pass or fail? Chances are you want to fail the step so it’s recorded, but note somehow that one result did pass. To accommodate this, you would fail the step but capture a comment:
The secondary challenge with this is reporting. Since I told the tool that this was a failure, any reporting I do will show it as a failure, ignoring the fact that one result did pass.
Single-action step, multiple expected results, individual pass/fail
As an alternative, the tool will let you mimic multiple expected results by adding an additional step, but without an action. For example:
Now when you execute this, you can mark individual expected results as pass/fail:
This will make it easier to interrogate test results to see exactly where the failure occurred. Additionally, if you use Microsoft Test Manager, it has the ability to create an action recording to let you fast-forward through specific steps in subsequent test runs. Breaking up the results into individual steps will make this recording/playback experience more accurate.
Thanks for reading!