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

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-9.0.0/ext/qualitycenter
. This script can be
used as template for all QF-Test tests in Quality Center. Please see subsection 28.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-9.0.0/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 55). 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:

Step-by-step integration guide
General steps to be performed on the the test system:
-
Copy the template worker script from
qftest-9.0.0/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. - 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:
- Start Quality Center and log in to your project.
-
You might want to create a new test set e.g. called "DemoTestSet" in the "Test plan" area.
Figure 28.3: In Test plan create new Test set -
In this test set create a new test with type VAPI-XP-TEST.
Figure 28.4: Create new test of type VAPI-XP-TEST -
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).
Figure 28.5: HP VAPI-XP Wizard -
You will then get a new test as shown below.
Figure 28.6: Test details -
Change to the 'Test script' tab of the test and copy the content of the template file
qftest-9.0.0/ext/qualitycenter/qcVapiXPTemplate.txt
into the Script Viewer's text area.Figure 28.7: Copy template content to script text area -
Within the script please do following adaptations:
-
Change the
pathToModule
variable to the location you have copied the worker scriptqcTemplate.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.
-
Change the
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
- Change to the "Test lab" section in Quality Center.
-
You might want to create a new sample test set.
Figure 28.8: New test set in Test lab section -
Add the test case to the new test sets' execution grid by choosing it from the test plan
structure.
Figure 28.9: Add test to execution grid -
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.
Figure 28.10: Run the test -
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.
Figure 28.11: Test result - 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.
-
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.
Figure 28.12: Uploaded run log
Troubleshooting
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.

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.