Tuesday, 18 December 2012

Working with Multiple Actions | QTP Tutorial PDF

Working with Multiple Actions

If you examine one of the tests you created in the previous lessons, you will see that it can be divided into several distinct processes:
You logged into the Mercury Tours site.
You submitted a flight order.
You logged out.
Assume that you wanted to run your test for five different flight orders. As we saw in “Parameterizing Tests”, you could parameterize your test so that it would run the test five times using five different sets of data. You can also organize your test so that only the second procedure runs five times, simulating a single user logging in, ordering five flights, and logging out. You do this by dividing your test into calls to different actions.
To divide your test into calls to different actions, you can insert a call to a new action, split an existing action into calls to two actions, insert a call to a
copy of an existing action, or insert a call to an existing action.
You can insert calls to actions into your test during your recording session or afterwards. Use one of the following menu options or tool bar buttons to add actions to your test:
Insert > Call to New Action or use the Insert Call to New Action button.
Step > Split Action or use the Split Action button.
Insert > Call to Copy of Action or right-click an action and choose Insert Call to Copy of Action.
Insert > Call to Existing Action or right-click an action and choose Insert Call to Existing Action.

No comments: