How To Extract A Web Test Out Of An Existing Web Test In Team System
There are times when you have a part of a scenario that needs to be repeated in other scenarios.
There are two options available:
- Record the steps each time for each of the scenarios.
- Create a Web Test that includes these scenario steps and embed the Web Test in other web tests.
Option 2 is obviously preferable because it saves valuable time, take in account that you are not just recording steps but you also adds roles to it and modify it, wouldn’t you prefer to do that one time only?
In Team System 2008 there is a nice feature that allow you to do option 2 very easily, extract the required steps, automatically create a web test and embed the web test in other web tests.
So how is it being done?
Step 1: Record your scenario, include the steps that will be later extracted.
Step 2: Modify your recorded Web Test, include roles to verify the results.
Step 3: Right click the first request and choose “Extract Web Test…” option.
You can see in the example that I have recorder a log-in scenario to facebook and checked my Inbox.
What I like to do is to extract the Log-In steps to reuse.
Step 4: Type the name of the new Web Test, choose the first step to extract and choose the last step to extract.
Step 5: Click the OK button and you are done!
You can see that the new Web Test is embedded in the web test I have first created, look at your test project and you will find there the new web test also.
What you can do from this point is use the new Web Test as stand allown Web Test or embed it to other Web Tests.
Have Fun!