In this section:
Sending Test Data to DOORS Next
The following diagram shows how you could implement an automated infrastructure for integrating Parasoft DTP and Parasoft test execution tools into your DOORS Next environment:
- Create requirements or test case definitions in IBM DOORS requirement management system and test management system. These items will be associated with tests executed by Parasoft tools.
- In your test file, add the DOORS Next test case or requirement IDs using the
@test
or@req
annotation. Refer to your Parasoft tool documentation for details on adding annotations.- Use the
@test <DOORS Next test ID>
annotation to associate tests with items in a DOORS Next Test management system. - Use the
@req <DOORS Next System Requirements Specification ID>
annotation to associate tests with requirements in DOORS Next. Parasoft creates a "Validated By"/"Validates" relationship between a test case and requirement in DOORS Next. - You can get the work item ID from various parts of the DOORS Next interface, such as the URL:
- Use the
- Execute your tests as part of the CI process. You can also manually execute the tests from the IDE.
- As part of the test execution, Parasoft test execution tools will tag the results with the filter and build IDs and send the data to DTP. You can verify the results in DTP by adding Test Widgets to your DTP dashboard and setting the filter and build ID. Developers can download the test execution data from DTP into their IDEs so that they can address any failed tests.
If you deployed the Sending Test Data to External System flow (see Deploying the Sending Test Data to External System Flow), then unit and functional testing results will automatically be sent to DOORS Next when Data Collector receives the data from the Parasoft tool. By default, the flow forwards unit and functional test results that were received by Data Collector for any project, but you can configure the flow to only send data for a specific project (see Sending Results from a Specific DTP Project).
You can also manually send a POST request to the DTP REST API endpoint to send results from the DTP database to DOORS Next. Pass the DTP filter and build IDs as URL parameters in the API call:curl -X POST -u <username>:<password> "http://<host>:<port>/grs/api/v1.7/linkedApps/configurations/1/syncTestCases?filterId=<filterID>&buildId=<buildID>"
The following table describes the endpoint parameters:
Parameter Value Description Required filterId
integer Specifies the filter ID containing the test data. The filter ID is an integer value and should not be confused with the filter name. Required buildId
string Specifies the build ID containing the test data. Required groupResultsBySOAtestTST
boolean
Setting to
true
groups SOAtest results by .tst file. As a result, one .tst file will be associated with one DOORS Next test.Setting to
false
associates each test step within a SOAtest .tst with a DOORS Next test.Default is
false
Optional The filter and build IDs are available in the Test Explorer URL:
DTP will locate the test results that match the
filterId
andbuildId
parameters and send the data to the DOORS Next work items.- When DTP locates results with an
@test <ID>
, it will search for items with a matching ID in IBM Jazz Test Management and update the item. No action will be taken if the unit test case IDs do not exist in DOORS Next. Use the annotation to associate tests with test executions in DOORS Next, if necessary. - When DTP locates results with an
@req <ID>
, it will search for items with a matching ID in DOORS Next. If a match is found, Test Execution Records will be added to the Test Case associated with the requirement. If there are no Test Cases for the requirement ID, then Test Case will be created, and a Test Execution Record will be added. - An external-app.log file will also be written to the
<DTP_INSTALL>/logs
directory. This log file contains progress information about sending test results from DTP to DOORS Next.
- When DTP locates results with an
After DTP processes the report and sends results to DOORS Next, you should expect a response similar to the following:
{ "createdTestSession": "DTPP-521", "created": [ "DTPP-519, testName = testBagSumAdd" ], "updated": [ "DTPP-519, testName = testBagSumAdd", "DTPP-518, testName = testBagSimpleAdd" ], "ignored": [ "MAGD-567, testName = testBagNegate", "QAP-512, testName = testTryThis3", "QAP-512, testName = testTryThis4", "MAGD-567, testName = testBagMultiply" ] }
Sending Results from a Specific DTP Project
If you are using the Sending Test Data to External System flow to forward unit and functional test results, data will be sent to DOORS Next for all DTP projects by default. As a result, work items will be updated to include the tests collected for any DTP project that contain annotations matching DOORS Next IDs. You can configure the flow, however, to only send data for a specific project.
- Open Extension Designer and open the service where the Sending Test Data is deployed.
- Double-click the Toggle Projects Mode node and set the value from the dropdown to
true
. This toggles on the ability to only send data to specific projects. - Click Done.
Double-click the Configure Projects node. The logic in this node specifies which DTP projects should have their data sent to DOORS Next during the sync operation. These project configurations are stored in a JSON array.
There is a sample project configuration already defined as an example:{ project: 'abc' }
To add more project configurations, add a comma to the end of the last project configuration and add a new entry below it. For example:
msg.configuredProjects = [ { project: 'abc' }, { project: 'foobar' } ];
- Once the desired projects have been configured, click Done.
- Click Deploy to update the flow with these changes.
When the flow executes, only test results for the specified DTP project will be sent to DOORS Next.
Viewing Results in DOORS Next
You will be able to view results in DOORS Next after sending the test run data from Parasoft DTP. The test results will be visible both in Jazz Test Management (/qm
) and in DOORS Next requirement management (/rm
).
The image below shows a Test Plan in Jazz Test Management (/qm
). This test plan has been created by Parasoft DTP (as automatically noted in the Description) and represents a single /syncTestCases
API run.
This test plan contains test cases. Each test case is equivalent of a test in Parasoft DTP.
You can drill down into a test case to view details. There are two important pieces of traceability information:
- The Validates Requirements section shows traceability to the requirement.
Links to requirements here are automatically created by Parasoft DTP
/syncTestCases
based on@req
information provided in Parasoft tests. A link to this area is also created in the Validated By section of the requirement in DOORS Next. - The Test Case Execution Records section shows test runs for the test case.
Note that this Test Case Execution Record is equivalent of this test case run in Parasoft tool. It contains its run status, date, and a link back to Parasoft DTP to view the run details.