QuerySurge exposes Test Management REST API for integration with the major Test Management Tools:
- HP Quality Center/Application Lifecycle Management 1
- Microsoft Team Foundation Server 2
- IBM Rational Quality Manager 3
1 HP ALM/QC is now owned by OpenText and may be referred to as OpenText Quality Center or OpenText ALM.
2 Team Foundation Server has been rebranded to Azure DevOps.
3 IBM Rational Quality Manager has been rebranded to IBM Engineering Lifecycle Management
The Test Management REST API allows you to:
- Drive QuerySurge executions from the integrated management tool
- See outcome responses (e.g. Pass/Fail) in the management tool for your QuerySurge tests
- Link from the management tool to QuerySurge, so you can 'click-through' from the management tool result to your QuerySurge data
Once QuerySurge is installed on a machine, the Test Management REST API requires no supplemental installation; it can be accessed through any HTTP-accessible scripting tool.
Note: QuerySurge Test Management REST API for test management integration are licensed separately.
Test Management Samples
To assist users in getting started with the Test Management REST API, sample script files can be installed during the QuerySurge installation process. Additionally, these samples can be installed independently, eliminating the need for a full QuerySurge installation.
The sample scripts are available for download in the Resource section at the end of this article.
Test Management REST API calls
The Test Management REST API is called by a Test Management tool component:
- For HP Quality Center/Application Lifecycle Management, the Run Scheduler calls the api.
- For Microsoft TFS (VSTS), a Visual Studio Agent calls the api.
- For IBM Rational Quality Manager, the Command-Line Adapter calls the api.
API Authentication
In order to use the Test Management REST API, users must first authenticate utilizing the correct hostname, port and authentication credentials. These parameters are pre-configured in the sample scripts and users must verify that they align with their specific environment settings.
Script Examples for QuerySurge Connectors
This section goes into more details of the different scripts that comes with the sample.
HP QC/ALM EXAMPLES
A "VAPI-XP-TEST" sample script ALM_QC_Script_Rest.vbs is provided (VBScript). This example is a standalone script in which all input values are defined in the code.
The sample shows the basics of how to create a QuerySurge Scenario execution, with the Suites executed specified by Suite ID. The script calls Test Management REST API to execute the specified Scenario, and returns an XML stream to the QC/ALM script, which the code parses into the Run Details showing the QueryPairs executed, the Outcome of each QueryPair, and links back to QuerySurge for the detailed results data for each QueryPair.
The sample script can be found on any box where you have installed QuerySurge Test Management Samples, at:
\\..\<QuerySurge install dir>\QuerySurge\rest\samples\testmanagement-samples
Samples:
ALM_QC_Script_Rest.vbs
MICROSOFT TFS EXAMPLES
The TFS samples include two C# scripts. TFS_ScenarioBySuiteId.cs is a 'Unit Test' file and TFS_QuerySurgeConnection_Rest.cs is a library file that get invoked to establish connection with QuerySurge and call the REST APIs to execute scenarios and return results.
The sample shows the basics of how to create a QuerySurge Scenario execution, with the Suites executed specified by Suite ID. The TFS_QuerySurgeConnection_Rest.cs file calls Test Management REST API to execute the specified Scenario, and returns a HTML stream which the code saves and attaches to the Test Result. The HTML attachment shows the QueryPairs executed, the Outcome of each QueryPair, and a link back to QuerySurge for the detailed results data for each QueryPair.
These sample scripts can be found on any box where you have installed QuerySurge Test Management Samples, at:
\\..\<QuerySurge install dir>\QuerySurge\rest\samples\testmanagement-samples
Samples:
TFS_ScenarioBySuiteId.cs
TFS_QuerySurgeConnection_Rest.cs (library file)
IBM RQM EXAMPLES
The RQM sample scripts include two examples that demonstrate how to create a QuerySurge Scenario execution, specifying the Suites to be executed using their Suite IDs. The RQM_Cmd.bat script is invoked by the RQM Command Line Adapter and is responsible for executing RQM_Script_Rest.ps1, which in turn performs the necessary REST API calls to initiate the scenario execution and retrieve the outcome.
The sample script can be found on any box where you have installed a QuerySurge Test Management Samples, at:
\\..\<QuerySurge Install Dir>\QuerySurge\rest\samples\testmanagement-samples
Samples:
RQM_Cmd.bat
RQM_Script_Rest.ps1
Resources