Run a Test in QTP Tool

In this article we discuss running tests in the Quick Test Professional (QTP) Tool.

Running Tests in QTP Tool

run.PNG

When you run a test, Quick Test Professional performs the test. If you have defined test parameters, Quick Test prompts you to enter values for them.

When the run session is complete, Quick Test displays a report detailing the results.


Running Your Entire Test
 

Quick Test always runs a test from the first step, unless you specify.

To run a test from or to a selected step or action, you can use the Run from step or Run to Step options. These features are useful if you want to check a specific section of the test, without running the test from the beginning or the end.

When you start to run a test, The Run dialog box opens to enable you to specify the location for the results and to enter the values for any test parameters you have defined.


To Run a Test:
 

option run.jpg

  1. If your test is not already open, select File>Open>Test.
  2. Click the Run button in the Tool bar or select Automation>Run. The Run dialog box opens.
  3. In the Run dialog box, specify the results location and the input parameter values (if applicable) for the run session.
  4. Click ok. The Run dialog box closes and the run session starts. By default, when the run session ends, the Test Results window opens.

Running Part of your Test

You can use the Run from Step option to run a selected part of your test.
 

run from step.jpg

This enables you to check a specific section of your application or to confirm that a certain part of your test runs smoothly.

You can use the Run Current Action option to run a single action in your test. Using Run Current Action ignores any iterations. However, if the action contains nested actions, Quick Test runs the nested actions for the defined number of iterations.


To run an entire action, or run a test or action from a selected step:
 

last.png

  1. Make sure your application is in a state matching the action or step you want to run
  2. Select the action or step where you want to start running the test
  3. In the Test Flow pane, select the action
  4. In the Keyword View, highlight a step or action row
  5. In the Expert View, place your cursor in a line of VBscript