Zoette
Zoette

Reputation: 1281

Only launch first row of all tests in UFT

We have many UFT test scripts with many datasets.

In order to perform a quick check of the scripts, we want to run every script using only, for each script, the first dataset of the data table.

We know how to do it unitary (with the "Test settings" window) but not globally.

We don't even know if it's possible, if you have some info please tell me!

Thank you

Upvotes: 0

Views: 558

Answers (1)

sumeet singh kushwah
sumeet singh kushwah

Reputation: 188

Use the below VBscript and change the path C:\QTP\Scripts\MyScript with your script path. This scripts will open and run the UFT test and set the data table iteration to 1st row only. You can also loop this script to execute all UFT Tests with one iteration only.

Dim App 'As Application

Set App = CreateObject("QuickTest.Application")

Set qtResultOpt=CreateObject("QuickTest.RunResultsOptions")

qtResult.ResultsLocation="C:\Temp\"

App.Launch

App.Visible = True

App.Test.Settings.Run.IterationMode = "rngIterations"

App.Test.Settings.Run.StartIteration = 1

App.Test.Settings.Run.EndIteration = 1

App.Open "C:\QTP\Scripts\MyScript", True

Set objTest=qtApp.Test

objTest.Run qtResultOpt

Upvotes: 1

Related Questions