Unified Functional Testing Practitioners Forum
cancel

## QTP How to run multiple iterations

SOLVED
Go to solution
Highlighted
Respected Contributor.

## QTP How to run multiple iterations

Requirements: For Fight application, we want to login as different user Name, each user book ticket three times

User1: book ticket name Lisa1
User1: book ticket name Lisa2
User1: book ticket name Lisa3

User2: book ticket name Lisa1
User2: book ticket name Lisa2
User2: book ticket name Lisa3

User3: book ticket name Lisa1
User3: book ticket name Lisa2
User3: book ticket name Lisa3

We have two actions Login and Book Tickets.

If we set login Name as Parameter in global sheet, and ticket Name as Parameter in Book Tickets action table, QTP only run three iterations

User1: book ticket name Lisa1
User2: book ticket name Lisa2
User3: book ticket name Lisa3

How to set up data tables to run 9 iterations ?

8 REPLIES
Acclaimed Contributor.

## Re: QTP How to run multiple iterations

If I understand your question just put

User1: book ticket name Lisa1
User1: book ticket name Lisa2
User1: book ticket name Lisa3
User2: book ticket name Lisa1
User2: book ticket name Lisa2
User2: book ticket name Lisa3
User3: book ticket name Lisa1
User3: book ticket name Lisa2
User3: book ticket name Lisa3

in the global table.
Respected Contributor.

## Re: QTP How to run multiple iterations

Do you mean set Login name and Ticket name in Global?

Login Name ticket name
User1 Lisa1
User2 Lisa2
User3 Lisa3
Acclaimed Contributor.

## Re: QTP How to run multiple iterations

I guess so,

Each row of the global sheet will cause the script to run your action so you need 9 lines with the different parameters you need.
Respected Contributor.

## Re: QTP How to run multiple iterations

We want to set up three rows to run 9 iterations

Login Name Book Ticket Name
User1 Lisa1
User2 Lisa2
User3 Lisa3
Acclaimed Contributor.

## Re: QTP How to run multiple iterations

ok, you can but that would require you to do a loop in you action. It is much easier to just put 9 line in the global sheet

User1 Lisa1
User1 Lisa2
User1 Lisa3
User2 Lisa1
User2 Lisa2
User2 Lisa3
User3 Lisa1
User3 Lisa2
User3 Lisa3
Respected Contributor.

## Re: QTP How to run multiple iterations

If I add loop, QTP only book ticket for Lisa1 three times.

Is it possible we add three rows for Login name, and three row for book ticket name, and run 9 rows
Acclaimed Contributor.
Solution

## Re: QTP How to run multiple iterations

Use your Book Tickets action and create a sheet there that has the three rows Lisa1, 2, 3

Then in keyword view right click on the Action and select "Action Call Properties" and select "Run on all rows"
Respected Contributor.

## Re: QTP How to run multiple iterations

Thank you ! It works