Defining Startup Applications and Functions - WinRunner

Startup applications and functions are applications and functions that WinRunner runs and executes before running a test. For example, you can set the Flight Reservation application as your startup application and you can define a startup function that logs in to the Flight Reservation application before your test run begins.

You define startup applications and startup functions in the Run tab of the Test Properties dialog box. You can define startup application and/or function options while creating your test. You can also select whether or not to run the startup application and/or function before running your test without modifying the startup function or application definitions.

WinRunner implements Run tab settings only when you run the test from the beginning, such as when you select Run From Top or Run Minimized > From Top, or when the test runs . For more information on these options, see “WinRunner Run Commands”

WinRunner implements the Run tab settings of a called test when the called test runs, unless you use Step Into to open the called test. For more information on calling a test, see “Calling Tests.” For moreinformation on the Step Into option, see “Controlling Your Test Run.”

Defining a Startup Application

When defining a startup application, you specify the path to the application, any required parameters, and the amount of time WinRunner waits between invoking the application and running the test.

Note that additional methods exist for running an application:

You can use the invoke_application function to run an application at any time from within a test script. Use this method to run an application during a test run. For more information, see “Starting Applications from a Test Script”

You can run an application when you run WinRunner from the command line. Use this method to run the application before WinRunner starts. For more information, see “Running Tests from the Command Line.”

To define a startup application:

  1. Choose File > Test Properties to open the Test Properties dialog box.
  2. Click the Run tab.
  3. To define a startup application

  4. Select the Run application before running test check box if you want your startup application to run in the next test run.
  5. In the Application path box, enter the application path or use the browse button to navigate to the application that you want to run.
  6. Enter any required application parameters in the Application parameters box, separated by commas (,). For information about application parameters, refer to the application documentation.
  7. In the Run test after box, enter the amount of time you want the system to wait between invoking the application and running the test, or accept the default (0 milliseconds).
  8. In the Open window box, select how you want the application window to appear when it opens. The possible options are:

To define a startup application

Defining a Startup Function

A startup function can be either a TSL function or a user-defined function contained in a compiled module. When defining a startup function, you specify the name of the function, function parameters (if any), and the compiled module name and type (for user-defined functions). For more information on TSL functions, see “Generating Functions”. For more information on user-defined functions and compiled modules, see “Creating User-Defined Functions” and “Creating Compiled Modules.”

To define a startup function:

  1. Choose File > Test Properties to open the Test Properties dialog box.
  2. Click the Run tab.
  3. To define a startup function

  4. Select the Execute function before running test check box if you want your startup function to execute the next time your test runs.
  5. In the Function name box, enter the name of the function.
  6. Enter any parameters required for the function in the Function parameters box.
  7. If the function is part of a compiled module, enter the name of the compiled module containing the function in the Compiled module box, or use the browse button to navigate to the compiled module.
  8. If the function is part of a compiled module, select the compiled module type in the Load module as a box.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics