By default, when you run a test with global QTP Data Table parameters, QuickTest runs the test for each row in the Data Table, using the parameters you specified.
For example, the following global QTP Data Table contains 3 rows:
The iteration number of QTP test can be specified in 'File/Settings.../Test Settings dialog', 'Run' tab:
So, the question is How to determine the current iteration number withing QTP script?
Answer: We can use the value of "TestIteration" environment variable - Environment("TestIteration").
This is a sample QTP script I use to demonstrate Environment("TestIteration"):
And the result of above QTP script is:
As you can see, QuickTest Professional script works correctly.
You can use this approach to determine the current iteration number of running QTP script.
- How to record QTP script - VIDEO tutorial
- How to get text of status bar from QTP?
- QTP VIDEO - How to capture dynamic text
- QTP Descriptive programming - processing images
- QTP - How to capture tool tip?
- How to minimize/maximize QTP window before the QTP script execution
- All QTP visual tutorials
Have you got interested materials or your own thoughts on QTP (QuickTest Professional)?
Let's share them and help each other to improve our skills and knowledge!
You can send them to my email:
Thank you in advance, dear readers.