Interview Questions

How to Run the Tests Using Winrunner

Introduction To WinRunner Basics

(Continued from previous question...)

How to Run the Tests Using Winrunner

WinRunner run commands
User can run the tests in three modes:
Verify run mode, to check the application
Debug run mode, to debug the test script
Update run mode, to update the expected results

User can use the Verify mode to check the application. WinRunner compares the current response of the application to its expected response. Any discrepancies between the current and expected responses are captured and saved as verification results.

User can Use the Debug mode to help to identify bugs in a test script. Running a test in Debug mode is the same as running a test in Verify mode, except that debug results are always saved in the debug folder. Because only one set of debug results is stored, the Run Test dialog box does not open automatically when the user run a test in Debug mode. When finishing running a test in Debug mode, the Test Results window does not open automatically. But the user can see the result.

Debugging facilities for debugging a test script:
The Step commands to control how tests run.
Set breakpoints at specified points in the test script to pause tests while they run.
Use the Watch List to monitor variables in a test script while the test runs.
Use the Call Chain to follow and navigate the test flow.
Use the Input Parameters option in the Run dialog box to check how the test handles various parameter values before including the test in a call chain.

Use the Update mode to update the expected results of a test or to create a new expected results folder. Before running a test in Verify mode, user must have expected results for the checkpoints created. If the user needs to update the expected results of the test, user must run the test in Update mode. User can update the expected results for a test in one of two ways:
By globally overwriting the full existing set of expected results by running the entire test using a Run command
By updating the expected results for individual checkpoints and synchronization points using the Run from Arrow command or a Step command

WinRunner Run Commands
Run from Top Run from Top command run the active test from the first line in the test script. If the test calls another test, WinRunner displays the script of the called test. Execution stops at the end of the test script.
Run from Arrow Run from Arrow command run the active test from the line in the script marked by the execution arrow.
Run Minimized Run Minimized commands shrink the WinRunner window to an icon while the test runs. The WinRunner window automatically returns to its original size at the end of the test, or when user stops or pause the test run. User can use the Run Minimized commands to run a test either from the top of the test script or from the execution arrow.
Step Commands
Stop Command
Pause Command

Supplying Values for Input Parameters When Running a Test
If the test has one or more input parameters defined, user can provide values for those parameters when user starts to run the test. These values are used only for the current test run and are not saved with the test.

Batch Test
A batch test is a test script that contains call statements to other tests. It opens and executes each test and saves the test results. A test becomes a “batch test ” when the user select the Run in batch mode option in the Run category of the General Options dialog box before executing the test. Messages are suppressed for a batch test only if user runs the test using the Verify run mode. If user uses the Update or Debug run mode to run the test, messages are displayed. WinRunner suppresses all pause statements and any halts in the test run resulting from run time errors. If tests contain TSL texit statements, WinRunner interprets these statements differently for a batch test run than for a regular test run. During a regular test run, texit terminates test execution. During a batch test run, texit halts execution of the current test only and control is returned to the batch test.
When the user runs a regular, interactive test, results are stored in a subfolder under the test. If run in batch mode is selected, and then WinRunner saves the results for each (top-level) called test separately in a subfolder under the called test. Additionally, a subfolder is also created for the batch test that contains the results of the entire batch test run, including all called tests. When a batch test run is completed, user can view information about the events that occurred during the run in the Test Results window. If one of the called tests fails, the batch test is marked as failed. The Test Results window lists all the events that occurred during the batch test run. Each time a test is called, a call_test entry is listed. The details of the call_test entry indicate whether the call statement was successful.

(Continued on next question...)

Other Interview Questions