Quick Test Pro: Measuring Test Quality With NCover

QuickTest Professional can execute automation tests for web sites and applications in two different ways. QuickTest Professional executes tests either on an application that is already running or by starting an application and then executing tests on it. Each method requires a different NCover setup, and both possible NCover setup configurations are described below. For brevity, only setup with an application is described in detail. Setting up QuickTest Professional and NCover with a web site is very similar.

Case 1: The QuickTest Professional Test Starts The Application Under Test

The screenshot below shows the QTP record and run window configured to start the specified application and test it. The checkbox surrounded by the red border must be checked for this setup scenario to work.

coverage_qtp_ncover_2.png

Once this window opens in QTP and you've selected the right options, you’ll also need to select the application to test by using the green checkbox that is surrounded by the blue border.

Although QTP supports multiple applications, NCover can only gather coverage on one of them at a time, so if you want coverage on all of the applications (and QTP is configured to start several at the same time), then you’ll have to do coverage on each one separately by following these steps for each application that you want coverage on.

Once you've created and saved the test in QTP, close QuickTest Professional and start NCover Explorer. NCover Explorer should be in your start menu under the NCover folder. Open the Project Options window by clicking on the Manage Options button, and then click on the Project Configuration tab in the middle.

In the Path to application to application to profile field, enter the path to QTPro.exe. This is usually C:\Program Files\HP\QuickTest Professional\bin\QTPro.exe" as pictured. Make sure that the Keep Working Folder in sync with Application Path checkbox is checked.

Next, in the left-hand pane near the bottom of the Run Settings section, find and click on Advanced Options. Near the bottom of the page that opens up, find the Profiled Process Name field and enter the file name of the executable that QTP will start and test. In the QTP screenshot earlier, the right value was surrounded by a light green border.

Additional Configuration Instructions For 64-bit Operating Systems

Finally, in the left-hand pane find and click on NCover Path. Change the “ath to NCover.Console field to the location and filename of the x86 version of NCover, which is located at C:\Program Files (x86)\NCover\NCover.Console.exe.

That’s it! Click the Close button in the bottom right corner, and then click the big green play button to start NCover coverage. Once QTP starts, execute the tests normally, and once you’re done executing tests in QTP, close QTP and NCover will collect and display the coverage data.

Case 2: The QuickTest Professional Test Expects That The Application Under Test Is Already Running

The screenshot below shows the QTP record and run window configured to start the specified application and test it. The checkbox surrounded by the red border must be unchecked for this setup scenario to work.

coverage_qtp_ncover_1.png

Once this window opens in QTP and you've selected the right options, you’ll also need to select the application to test by using the green checkbox that is surrounded by the blue border.

Although QTP supports multiple applications, NCover can only gather coverage on one of them at a time, so if you want coverage on all of the applications (and QTP is configured to start several at the same time), then you’ll have to do coverage on each one separately by following these steps for each application that you want coverage on.

Once you've created and saved the test in QTP, Start NCover Explorer. (NCover Explorer should be in your Start Menu under the NCover folder). Open the Project Options window by clicking on the Manage Options button (pictured on the right), and then click on the Project Configuration tab in the middle.

In the Path to application to application to profile field, enter the path to the application that QTP will test. In this case, the path is C:\dev\ncover\main\release\ncover.registration86.exe (surrounded with a green border in the picture above), and make sure that the Keep Working Folder in sync with Application Path checkbox is checked.

Additional Configuration Instructions For 64-bit Operating Systems

Finally, in the left-hand pane find and click on NCover Path. Change the Path to NCover.Console field to the location and filename of the x86 version of NCover, which is located at C:\Program Files (x86)\NCover\NCover.Console.exe.

That’s it! Click the Close button in the bottom right corner, and then click the big green play button to start NCover coverage. Once QTP starts, execute the tests normally, and once you’re done executing tests in QTP, close QTP and NCover will collect and display the coverage data.

Questions? Comments?

Contact us.