Professional Documents
Culture Documents
3.calling WinRunner Tests
3.calling WinRunner Tests
WinRunner QTP
1) Approach Procedural Object oriented
2) Language TSL Visual Basic Script
3) Programming More Less
4) Recording Doesn't capture screen Captures screenshots as
Activescreens during
recording
5) Running Does not display screens Displays screens running tests
while running tests
• When you work with QuickTest, you can also run Win Runner tests and call TSL
or user-defined functions in compiled modules.
• If you have WinRunner 7.5 or later installed on your computer, you can include
calls to WinRunner tests and functions in your QuickTest test or Component
• Once you create a call to a WinRunner test or function, you can modify
parameter values in existing call statements by editing them in the Expert View.
• When QuickTest is connected to a Quality Center project that contains
WinRunner tests or compiled modules, you can call a WinRunner test or function
that is stored in that Quality Center project.
Note:
• For WinRunner versions earlier than 7.6, you cannot run WinRunner tests on Web pages (using
WinRunner’s WebTest Add-in) from QuickTest if the QuickTest Web Add-in is loaded. For
WinRunner 7.6, you can enable this Functionality by installing patch WR76P10 - Support WR/QTP
integration from the patch database on the Mercury Interactive Customer Support site
(http://support.mercury.com).
Note:
• For WinRunner versions earlier than 7.6, you cannot run WinRunner tests on Web pages (using
WinRunner’s WebTest Add-in) from QuickTest if the QuickTest Web Add-in is loaded. For WinRunner
7.6, you can enable this Functionality by installing patch WR76P10 - Support WR/QTP integration from
the patch database on the Mercury Interactive Customer Support site (http://support.mercury.com).
Rather than setting fixed values for the parameters required for a WinRunner
test, you can pass WinRunner parameter values defined in a QuickTest Data
table, random or environment parameter. You specify these parameterized
values by entering the appropriate statement as the Parameters argument in
the TSLTest.RunTestEx statement.
Example :-
Suppose you want to run a WinRunner test on a Windows based Flight
Reservation application, and that the test includes parameterized statements for
the number of passengers on the flight and the seat class. You can pass the
WinRunner test the value for its first parameter from a QuickTest random
parameter (that generates a random number between 1 and 100), and pass it
the value for the seat class from a QuickTest Data Table column labeled Class.
Your TSLTest.RunTestEx statement in QuickTest might look something like
this:
TSLTest.RunTestEx "D:\test1", TRUE, FALSE, RandomNumber(1, 100) ,
DataTable("Class", dtGlobalSheet)
Note:-
• Enhance the tests by parameterizing them where a range of input data is required to test certain
conditions. Parameterize the test to replace fixed values with values from an external source during
test run. The values can come from a Data Table, environment variables you define, or values that
QTP generates during the test run.
Accenture Confidential. For Internal use Only. 8
Working with winrunner
Note:
You cannot retrieve the values returned by the WinRunner function in your QuickTest test or business
component. However, you can view the returned value in the results.
Accenture Confidential. For Internal use Only. 9
Working with winrunner
Questions?
Q & A….
Summary
Summary
1. QTP facilitates calling WinRunner Functions by using the
TSLTest.CallFuncEx statement.
2. TSLTest.CallFuncEx also provides for passing QuickTest Parameters to a
WinRunner Function
3. QTP provides for viewing the Results with respect to the Pass/Fail of
Winrunner tests/functions through its own interface.