This guide provides instructions on how to setup both T-Plan Robot and HP Quality Center in order to integrate your automation scripts, allowing you to execute and view the results from the context of HP ALM.
HP Quality Center is a quality management software solution offered by the HP Software Division of Hewlett Packard. HP Quality Center is a component of the HP Application Lifecycle Management (“ALM”) software solution set.
The integration is achieved by utilising the VAPI-XP test type within Quality Center to launch console based applications i.e. T-Plan Robot.
T-Plan Robot is compatible with the CLI and even offers a “CLI Wizard” to help determine the correct required command and save as an executable file such as .bat. It is this that we will use to allow the integration to drive T-Plan Robot.
Setting up T-Plan Robot
Within T-Plan Robot there needs to be two aspects in place to allow the execution and reports to run successfully from and with HP ALM.
1 – ALM specific report output directory
2 – Generate a Script executable
Report Output Directory
Each T-Plan Robot script contains a “Report” command which allows to specify the output report format and location. The default location for script output is within the <projectDir>\reports\<custom> directory, however this doesn’t lend itself to the integration due to its dynamic nature. Instead we recommend to store your output files to a static directory of your choice which ALM will read from.
T-Plan Robot does allow for saving of multiple report files within a single “Report” command using a semi-colon separated list of filenames. We also recommend making use of the zip format output which will allow all associated output files to be uploaded to ALM post execution.
A sample report command might therefore look as follows:
NOTE: Relative paths for the report output are resolvable against the currently set “Output Path” of the Robot Project. Absolute paths are also accepted.
Test Script Executable
Within T-Plan Robot use the CLI Wizard located under the Tools main menu option to generate the script executable (.bat) file.
NOTE: As you can see, the resulting batch file will call the T-Plan Robot application and test scripts using the relevant files, therefore these all need to be accessible form the driving machine.
With the desired settings in place select “Save To File” and save the executable batch file in an accessible (shared) location.
To run the T-Plan Robot executable file (created above) from the context of HP ALM and correctly return the output results we need to configure Quality Center a particular way.
Setting up Quality Center
We have to create a “VAPI_XP” script using the following options…
Within the “Application Executable File” field enter the full path to the Robot script batch file (created using the Robot CLI Wizard earlie) and the click the “+” button. The entry should then be added into the bottom field:
The resulting test script now has the ability to call the T-Plan Robot script executable in order to run the automated script. However in order for it to also correctly pickup the Robot automation results we need to amend the generated VBScript.
The auto-generated VBScript ‘Sub’ code should be replaced with the following:
Save your code changes using the mini toolbar:NOTE: The file paths for the XTools.run and the OutputReport commands (lines 20-24) should be set according to your Robot Project location
Now that we have our new test prepared and able to run our T-Plan Robot automation script, we can now place that into a “Test Set” within the “Test Lab” section of ALM allowing us to initiate the execution.
You are now ready to execute your T-Plan Robot automation scripts from HP ALM!
Viewing Test Results
Clicking the attachment icon gives you quick access to the output report for that instance, otherwise you can select the executions “Run ID” to open up the “Run Details” screen. Selecting the Attachments option on the left will then give you access to the T-Plan output report/files:
T-Plan Robot automated test scripts can be executed from the context of HP ALM through the use of the CLI. The results of said executions are then visible also directly from within HP ALM.
The above instructions allow you to setup both T-Plan Robot and HP ALM (QC) in order to achieve this functionality. The above steps are also potentially a starting point from where you can further edit and enhance the integration to suit. Perhaps you want to pass some parameters at run-time, perhaps you want to retrieve other files etc., by following the above principles this should all be possible.