Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Driver Script to Run Multiple QTP Scripts

Driver Script to Run Multiple QTP Scripts

|Views: 225|Likes:
Published by Ramu Palanki

More info:

Published by: Ramu Palanki on Dec 29, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as RTF, PDF, TXT or read online from Scribd
See more
See less





For QTP Realtime Scripts, visitwww.ramupalanki.com
Hi,If you just wish to control the execution of QTP Actions, you don't need anything special.I'll describe a simple way of achieving your goal with really minimum development effort.1)Let's agree that your QTP test is a script that should run a sequence of actions.Each action can be a test on its own, or really a part of a more complex test.2)In such a case:a)Your main action (e.g., Action1) would contain the code as shown below.b)Define environment variables as required:TEST_FLOWMIN_ACTIONMAX_ACTIONYou can define these in the test or in an external xml file to be loaded at run-time with:
GeSHi (qtp):Environment.Load(<Pathname>)Created by GeSHI Action code
GeSHi (qtp):DimarrActions, blnBreak, intMinAction, intMaxAction, intCurActionarrActions =split(Environment("TEST_FLOW"),";") 'Remark: The TEST_FLOW environment variable would contain a concatenated stringwith the actions names separated by ; (semicolon). For example: "Login;CreateCustomer;Create Account;Activate Account;Create Service Package;Logout"blnBreak =FalseintCurAction =0intMinAction = Environment("MIN_ACTION")'MIN_ACTION would contain an integer  with the first action to run in the flow (default=1).
For QTP Realtime Scripts, visitwww.ramupalanki.com
If (intMinAction = 0Or intMinAction = "")Then intMinAction =LBound(arrActions)'Default End If intMaxAction = Environment("MAX_ACTION")If (intMaxAction = 0Or intMaxAction = "")Then intMaxAction =UBound(arrActions)'Default End If intCurAction = intMinActionDoblnBreak = RunAction arrActions(intCurAction)'it's also possible to build it with the other  parameters such as number of iterations, etc.intCurAction = intCurAction+1LoopUntil (blnBreakOr intCurAction > intMaxAction) Created by GeSHI approach (as you suggested) is to define per action whether to run it or not. Pleasenote that this requires that the actions ARE NOT functionally dependent.You can achieve this by defining an environment variable for each to-be-run action (e.g.,

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
kasaramkiran liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->