HP ALM - Quality Center


The current integration of QF-Test and HP ALM - Quality Center utilizes the built-in VAPI-XP-TEST type of Quality Center.

ALM-QC integration
Figure 26.1:  Integration with ALM - QualityCenter

The VAPI-XP-TEST type is intended to be an automated test case for any test-tool. QF-Test comes with a template file for the VAPI-XP-TEST script, which is qcVapiXPTemplate.txt, see qftest-7.1.4/ext/qualitycenter. This script can be used as template for all QF-Test tests in Quality Center. Please see subsection 26.1.2 for a detailed step-by-step description.

The QF-Test VAPI-XP-TEST template script employs an external worker VBScript script, called qcTemplate.vbs. This script is also part of the QF-Test distribution (see qftest-7.1.4/ext/qualitycenter) and has to be adapted to your specific needs. So we encourage you to copy that file to a project specific location and adapt it according to your needs.

The worker script launches QF-Test in batch mode on each test system locally, i.e. it has to be accessible for each test system. As the test suite files and the configuration files have to be available on the test system too, we recommend to put all those files on a shared network drive or into the version management system.

After the execution of the test the run log of QF-Test will be appended to the test instance as well as the status of the test will be set to the result.

You can also change the worker script to make use of a daemon call (for details about the daemon mode, please see chapter 53). In this case QF-Test will establish the network connection to the test system and launch the test by itself. In case of the normal batch call Quality Center establishes the connection to the test system and triggers the local QF-Test installation to perform the test. If you make use of the daemon call, the worker script has to be located on the Quality Center system, but the test suite still needs to be accessible on each test system.

If you do not make use of VBScript in your project, feel free to port the QF-Test demo scripts to JScript or any other supported language.

The following figure shows the VAPI-XP-TEST test case in Quality Center:

VAPI-XP-TEST test case             in HP ALM
Figure 26.2:  QF-Test VAPI-XP-TEST test case in HP ALM - QualityCenter

Step-by-step integration guide

General steps to be performed on the the test system:

  1. Copy the template worker script from qftest-7.1.4/ext/qualitycenter/qcTemplate.vbs to your project location and rename it to a proper name. We recommend to use the same path on all test systems. Perhaps you should use a shared network drive.
  2. Within the worker script you can define certain default option, e.g. whether the batch or daemon mode should be used as default and what should be the name for the default run log file. This also can be done at a later stage, which might be recommendable when initially starting with the integration process to keep things simple.

Steps in Quality Center to create a test case:

  1. Start Quality Center and log in to your project.
  2. You might want to create a new test set e.g. called "DemoTestSet" in the "Test plan" area.

    Create new testset
    Figure 26.3:  In Test plan create new Test set
  3. In this test set create a new test with type VAPI-XP-TEST.

    Create new test of type VAPI-XP-TEST
    Figure 26.4:  Create new test of type VAPI-XP-TEST
  4. NoteOn the HP VAPI-XP Wizard window just press finish without any modifications. (That means you have VBScript as script language and COM/DCOM Server Test as test type).

    HP VAPI-XP Wizard
    Figure 26.5:  HP VAPI-XP Wizard
  5. You will then get a new test as shown below.

    VAPI-XP test                 details
    Figure 26.6:  Test details
  6. Change to the 'Test script' tab of the test and copy the content of the template file qftest-7.1.4/ext/qualitycenter/qcVapiXPTemplate.txt into the Script Viewer's text area.

    VAPI-XP-TEST script                 content
    Figure 26.7:  Copy template content to script text area
  7. Within the script please do following adaptations:
    • Change the pathToModule variable to the location you have copied the worker script qcTemplate.vbs to.
    • Change the testSuiteFile variable to your desired test suite file.
    • If you want to execute one specific test, you can also change the testCase variable to the desired test case name.

Please read the comments in the script carefully, because you can also use test case specific settings optionally.

Steps to be performed to run the sample test case

  1. Change to the "Test lab" section in Quality Center.
  2. You might want to create a new sample test set.

    New set in test-lab
    Figure 26.8:  New test set in Test lab section
  3. Add the test case to the new test sets' execution grid by choosing it from the test plan structure.
    Add test to test set
    Figure 26.9:  Add test to execution grid
  4. Now you can launch the test case. Ensure the "Run all tests locally" checkbox is activated unless you really have a remote system with a QF-Test environment already set up.

    Run the test
    Figure 26.10:  Run the test
  5. Now Quality Center should start the test run - possibly on your machine, then you should see the SUT coming up after some time, actions being performed and closed at the end. When the run has finished, the result is noted down with the test: Passed or Failed.

    Test result
    Figure 26.11:  Test result
  6. After the test has terminated, in addition to the result the run log of the test will be uploaded as attachment to the test instance.
  7. To view the run log, please double-click to the test in the execution grid, then change to "Runs" and again double-click at the paper-clip attachments symbol for the respective test run.

    Uploaded run log
    Figure 26.12:  Uploaded run log


First of all we need to state that we are not QualityCenter experts. Therefore there might be better and advance options for troubleshooting. Hence we want to at least provide some hints we used so far.

Unfortunately the process output during the test execution in QualityCenter is only visible for a fraction of time, not allowing a direct analysis. Therefore we need to find a work around.

The text editor of the VAPI-XP-TEST node in the "Test plan" area allows to directly execute the script. Then in the output area below the output gets visible permanently showing possibly something helpful.

VAPI-XP-TEST script             debug run
Figure 26.13:  Script debug run

But the direct execution from the script node needs to be handled with care. Of course it is not considered as a real test run, so no run log can be uploaded which results in a respective Run-time error "Object required" in the output. Don't get confused by that!

For more debugging, additional statements like TDOutput.Print "Some text" can be added to both the test script and the worker script. By this you can see how far the script runs until a possible error occurs.

The text script editor has a "Syntax check" button which is helpful for validation after every change.