Calling multipe QTP scripts using VB file:


Calling multipe QTP scripts using VB file:

Well, Sometimes there comes a situation where we have to call multiple test files at a glance.
It would be cumbersome to call/open test one by one and run. Yet there are many alternative methods to achieve the same, but i love the way using array collection.
To make fully automated code/script you could even write a function to call all the tests from your test folder into the array collection dynamically and then executing the following code.Here, although, i have manually inserted every test into the array.

Function LoadNrun()
arrColl = Array(“C:\filename1”, “C:\filename2″,”C:\filename3”)
For each arrTest in arrColl
qtApp.Open arrTest
set qtTest = qtApp.Test
set objResultsOptions = CreateObject(“QuickTest.RunResultsOptions”) objResultsOptions.ResultsLocation = arrTest & “\Res1” qtTest.Run objResultsOptions qtTest.Close
Next
End Function
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: