Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
calling more than one test using driver script
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
How we can call more than one tests in a driver test?
Say I have test1, test2, test3.
if TC# is 1, I want to run test1...
is there any method to run a test or can we use quick test application object..I don't want to change my test into functions and use runaction.
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Options are available. You may need to pick yours.

1. you can load all the tests you have into a excel sheet, mark a execute flag and then loop through it using a external VBScript and it will initiate the execution. Yes, here you will need to use the QTP AOM.

I dont know if you can do it through QTP. However your last statement talks about "RunAction"...What does that mean ??
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks! Can you pls give me the sample script to call a test using AOM.
First I create a qucik test object and the launch and visible is set to true and then how to specify the path for the test I want to call.

Run action is for calling/executing an action if I change/save tests as action and then I can call the action if the flag is set Y in the xls.
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi,
U can try the following:
Test Data file(Excel) should have 2 fileds, 1.Script Name & 2.ToBeExecuted and the Driver Scripts will be as follows.

Code:
MyTest = DataTable.Value("Script", 1)
If DataTable.Value("ToBeExecuted", 1)= "YES" Then

Select Case MyTest

      Case "Test1"    
          RunAction("Test1", oneIteration)
    Case "Test2"    
          RunAction("Test2", oneIteration)
    Case "Test3"    
          RunAction("Test3", oneIteration)

          ---------
          
   End Select
Else
Reporter.ReportEvent 1, "-------------", "-------------------"
End If
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Pspsblog,

You can use Object.Open method to open your Test.
Syntax for this will be

Object.Open TestPath,OpenInReadOnlyMode,SaveCurrent

where
object : QTP Aplication object,
TestPath " Path for your test
OpenInReadOnlyMode : Optional [True/False]
Save Current : Optional [True/False]

Hope this will help you

Rameshrise3 - RunAction Statement can be used only for call a reusable action, you will not be able to call a test using RunAction

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  calling QTP script from one to another krishnas.tester 3 6,807 11-12-2014, 10:32 AM
Last Post: vinod123
  Excel and Driver Script shipu 1 3,863 02-27-2014, 09:09 AM
Last Post: supputuri
  Open QTP using Driver Script shipu 1 3,079 02-26-2014, 12:21 PM
Last Post: supputuri
Sad Batch Test Script Help nidhitaneja 0 2,604 02-09-2014, 10:34 PM
Last Post: nidhitaneja
  calling stored procedure from Oracle borisk 3 6,515 03-19-2013, 12:41 PM
Last Post: gaveyom

Forum Jump:


Users browsing this thread: 1 Guest(s)