In this section:
Introduction
This artifact creates two traceability widgets:
- Traceability - Test: The total percentage of tests passing
- Traceability - Req.: The total percentage of requirements with tests
Each widget drills down into an interactive report that help you understand how well requirements are being implemented and tested. The artifact also provides a model profile and an example flow for connecting widgets and reports to JIRA. Additional configuration is required to connect to a different requirements management system.
Requirements
- DTP Enterprise Pack 5.3.2.
- Parasoft DTP 5.3.2.
- At least one project set up in a third-party requirement management system (JIRA).
- At least one DTP filter configured to receive dynamic analysis details associated with one or more requirements from the system with the correct ID.
Installing the Workflow
See アーティファクトのダウンロードとインストール. Import both workflows into your service(s) in order to use both widgets.
Background: Associating Tests with Requirements
If you are running tests with Parasoft tools, you can use the UI to configure test/requirement associations. The following SOAtest example shows an @req tag and ID being added in a test suite's Requirement and Notes section in order to correlate the test with a requirement:
To correlate a unit test with a requirement, add @req < Requirement-ID >
to a comment in the test class:
/** * @req abc */ @Test public void testSomething() { ... }
See your testing tool documentation for additional information.
Profile Configuration
A model profile must be set up with the correct system server, type, project to ensure that report hyperlinks properly connect to your requirements management system. You can create a new model profile based on the Traceability Report model type that is provided with this artifact. See モデル プロファイルの使用 for general information about configuring model profiles.
- Click the Model Profile tab and choose the demo profile.
- Click Add Profile configure the following settings.
Type | The requirement management system type (JIRA, DTP, etc.). |
---|---|
Server | The requirement management system URL. |
Project | The project for which you want to gather requirements. |
Flow Configuration
A flow must be set up with the correct server/credentials for the artifact to function properly. In order to demonstrate how to configure the flow, we will use the JIRA example. The flow specifies how to connect to JIRA, including authentication, and how to transform the response into the appropriate format. If you are working with JIRA, you can customize this flow to suit your JIRA implementation. If you are working with a different requirement management system, you can create a similar flow for that system. By default, the flow limits the queried results to 1000 items. You can change this limit by setting The where The Get JIRA Story node transforms the JIRA API response into the expected format. You can customize the expected payload to suit your JIRA system details. For other systems or custom implementations, use a function node with a
maxResults
property of the jql
parameter to a greater value in the Endpoint field of the JIRA Query node. jql
parameter can be customized to add any valid JIRA JQL parameter, but make sure that the JQL parameter value is HTML escaped. To pass the following JQL parameters, for example:project={{{system.project}}} AND issueType=Story AND fixVersion=1.2.3
{{{system.project}}}
will be automatically replaced by the flow, you need to set the following (after URL encoding):project%3D{{{system.project}}}%20AND%20issueType%3DStory%20AND%20fixVersion%3D1.2.3
Make sure not to encode {system.project}}}. Use following characters to escape rest of the parameters:%3D Matches to equal sign (=) %27 Matches to single quote (')_ %20 Matches to a space ( ) msg.payload
property using the following format as a guide, as well as an HTTP Request node similar to the one shown above.{
"system": // this object should already exist in msg.system from the profile
{
"type": "JIRA", // type of the system defined in the profile
"server": "http://jira.parasoft.com:8720", // server defined in the profile
"project": "SDM Platform", // project defined in the profile
"url": "http://jira.parasoft.com:8720/browse/" // needs to be constructed for different systems
},
"requirements": // array of {id ,name} objects
[
{ "id": "SP-2", "name": "Test requirement 202" },
{ "id": "SP-1", "name": "Test requirement 201" }
]
}
This artifact can be used to create two widgets:
- Traceability - Test: The total percentage of tests passing
- Traceability - Req.: The total percentage of requirements with tests
These widgets are custom implementations of the Traceability Report – Percent widget that ships with Extension Designer.
- After configuring the artifact, deploy it to DTP (see Deploying Services).
- Open Report Center and add the widgets from the Process Intelligence category (see ウィジェットの追加).
- Configure the widget settings:
Title | Enter a new title to replace the default title that appears on the dashboard. |
---|---|
Filter | Choose Dashboard Settings to use the dashboard filter or choose a filter from the drop-down menu. |
Build | Choose the latest build or a build from the drop-down menu. |
Profile | Specify the name of the profile that you configured in Profile Configuration. |
.