How to call two differnet files to run one after another. For Example File A has function 1 & File B has function 2. I want to run file A and then File B. In Winrunner we can use call statement to run the files. How to do the same in QTP?
Create a new test.
Then go to
"Call to Existing Action" and choose your first (A) action.
Redo the above but now call for your next action (B)
You can also call for B in Test A, or A in test B. But I've found it to be better if you have them both in a completely new test.
Remember to make both the test reusable. For that go to:
Keyboard view -> Action Properties (right click on the action) and then tick of the "Reusable Action"
- How many testers do you need to switch a light bulb? None, we just report it's dark -
Just adding to the above. If u want to use external functions, you need to first add them to your test. It is done the following way:
1. Go to File --> Settings
2. Select Resources tab
3. Press button '+' and browse to add the function.
Now whenever you need to use the function just type the function name and the parameters to be passed.
e.g. FunctionName "TestParam", "testparam"
Use RunAction Statement.
RunAction ActionName, [IterationMode , IterationRange , Parameters]
Thnks for all the replies. Its working