In this section:

Introduction

If your organization tracks and manages software development projects in Jira, you can connect DTP to your Jira system in the administration page. Connecting DTP to Jira provides the following functionality:

Requirements

This feature has been tested with Jira Project Management Software v8.0.2#800010 and Jira Cloud. The feature may not function as expected on other versions of Jira. 

The following requirements are only applicable if you are going to send test results to Jira:

  • Tests executed by the following Parasoft tools are supported:
    • C/C++test Professional, dotTEST, or Jtest 10.4.3 +
    • Selenic 2020.1 +
    • SOAtest 9.10.8 +
  • Xray plug-in

Configuration

The configuration is performed by the Parasoft administrator and only needs to be set up once. Developers, testers, and other DTP end users should review the Usage section for instructions on how to use Parasoft with Jira.

Connecting DTP to Jira

  1. Choose Report Center Settings from the settings (gear icon) drop-down menu.
  2. Choose External Application and choose Jira from the Application Type drop-down menu.
  3. Enable the Enabled option.
  4. Enter a name for the server in the Name field. The name is required but does not affect the connection settings or render in any other interfaces.
  5. Enter the URL of your Jira system in the Application URL field. The URL should include the protocol, host, and port number. Do not include paths or parameters, e.g., http://jira.yourcompany.com:8080.
  6. Enter a URL for rendering links to your Jira system from DTP in the Display URL field. This URL should include additional paths that may be necessary to access Jira in a browser, e.g., http://jira.yourcompany.com.
  7. Enter your username and either a password (self-managed Jira server) or an API token (Jira Cloud) in the appropriate fields. The login must have sufficient privileges to create Jira issues in the projects specified in the Project Associations section. 
  8. Click Test Connection to verify your settings and click Save.

Connecting to Xray Cloud

Xray is an extension for Jira that manages tests. Xray is available as a hosted or cloud-based application. DTP can send data to hosted instances of Xray through the connection as described in Connecting DTP to Jira. For cloud-based instances of Xray, enable the Xray (Cloud) enabled option and specify the Xray client ID and secret so that you can leverage the functionality described in the Sending results from DTP to JIRA/Xray section.

Refer to the Xray documentation for information about generating client IDs and secrets: https://confluence.xpand-it.com/display/XRAYCLOUD/Global+Settings%3A+API+Keys

Associating Parasoft Projects with Jira

Creating links between Parasoft with Jira at the project level enables defects created in the Violations or Test Explorer view to be created in the correct project in Jira.

  1. Click Create Project Association and choose a project from the DTP Project drop-down menu in the overlay. 
  2. Enter the name of a Jira project in the External Project field and click Create to save the association.

Click the trash icon to remove a project association. Deleting the project association does not remove links in DTP explorer views to defects in Jira. If an association is deleted and recreated later, existing links between violations and Jira issues will be reactivated. 

You can associate multiple projects in DTP with a project in Jira, but you cannot associate the same DTP project with more than one Jira project.

Enabling the Requirements Traceability Report

You can configure DTP to generate widgets and reports that help you demonstrate traceability between the requirements stored in Jira and the test, static analysis, and build review data sent to DTP from Parasoft tools (C/C++test, dotTEST, Jtest, SOAtest).

Your source code files must be associated with stories in Jira. See Associating Requirements with Files for instructions.

DTP interfaces that display and track traceability are enabled by deploying the External Application Traceability Report artifact shipped with the Traceability Pack. The Traceability Pack also includes the Sending Test Data to External Application flow, which automates part of the requirements traceability workflow. Refer to the Traceability Pack documentation for additional information about the pack.

Use DTP Extension Designer to deploy the External Application Traceability Report and the Sending Test Data to External Application flow to your environment. Verify that DTP is connected Jira as described in Connecting DTP to Jira before deploying the artifact. 

Installing the Traceability Pack

The first step is to install the Traceability Pack artifact. The artifact is a collection of configuration files and assets that enable traceability.

  1. Choose Extension Designer from the settings menu (gear icon). 
  2. Click the Configuration tab to open Artifact Manager.
  3. Click Upload Artifact and browse for the traceability-pack-<version>.zip archive (also see Downloading and Installing Artifacts).
  4. Click Install and a collection of assets and configuration files for enabling traceability will be installed.

Deploying the Traceability Report

Deploy the report components to your DTP environment after installing the External Application Traceability Report artifact.

  1. Open Extension Designer and click on the Services tab.
  2. Choose an existing service to deploy the artifact or create a new service in the DTP Workflows category. Refer to Working with Services for additional information on organizing services and artifacts.
  3. If you are adding the artifact to an existing service, add a new Flow tab (see Working with Flows) and choose Import> Library> Workflows> Traceability Pack> External Application Traceability Report from the vertical ellipses menu.
  4. Click inside the Flow tab to drop the nodes into the service and click Deploy.

Deploying the External Application Traceability Report adds new widgets to Report Center, as well as a drill-down report. See Viewing the Traceability Report for instructions on adding the widgets and viewing the report.

Deploying the Sending Test Data to External Application Flow

This artifact sends test data to Jira when DTP Data Collector retrieves test results from a Parasoft tool. This artifact ships with the Traceability Pack, which must be installed as described in Installing the Traceability Pack before deploying the flow. You should also verify that the DTP Enterprise Pack connection is to DTP is configured with the host name of the server running DTP.  

By default, Enterprise Pack points to localhost. See Server Settings for additional information.

  1. Open Extension Designer and click on the Services tab.
  2. Choose an existing service to deploy the artifact or create a new service in the DTP Workflows category. Refer to Working with Services for additional information on organizing services and artifacts.
  3. If you are adding the artifact to an existing service, add a new Flow tab (see Working with Flows) and choose Import> Library> Workflows> Traceability Pack> Sending Test Data to External Application  from the vertical ellipses menu.
  4. Click inside the Flow tab to drop the nodes into the service and click Deploy

Usage

After configuring the integration with Jira, developers, testers, and other users can leverage the functionality enabled by the integration.

Manually Creating Bugs and Tasks in Jira

The Test Explorer and Violations Explorer views enable you to create bugs and tasks for any test and violation, respectively, regardless of status. Refer to the following sections for details on creating Jira assets in explorer views:

Sending Test Data to Jira/Xray 

The following diagram shows how you could implement an automated infrastructure for integrating Parasoft DTP and Parasoft test execution tools into your Jira environment:

  1. Create tests and/or stories in Jira. The items will be associated with tests executed by Parasoft C/C++test, dotTEST, or Jtest. 
  2. In your test file, add the Jira test or story IDs using the @test or @req annotation. See the C/C++test, dotTEST, or Jtest documentation for details on how to add annotations. 
    • Use the @test <Jira Test ID> annotation to associate tests with test executions in Jira.
    • Use the @req <Jira Story ID> annotation to associate tests with stories in Jira
  3. Execute your tests as part of the CI process. You can also manually execute the tests from the IDE.
  4. 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.
  5. If you deployed the Sending Test Data to External Application flow (see Deploying the Sending Test Data to External Application Flow), then unit and functional testing results will automatically be sent to Jira when Data Collector receives the data from the Parasoft tool.
    You can also manually send a POST request to the DTP REST API endpoint to send results from the DTP database to Jira. 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 filter and build IDs are available in the Test Explorer URL:

  6. DTP will locate the test results that match the filterId and buildId parameters and send the data to the items in Jira.
    • When DTP locates results with an @test <ID>, it will search for and update tests with a matching ID in Jira. No action will be taken if the IDs do not exist in Jira.
    • When DTP locates results with an @req <ID>, it will search for Jira stories with a matching ID and add test executions to the story. If the ID does not exist, new test executions will be added to Jira. 
    • An external-app-sync.log file will also be written to the the <DTP_INSTALL>/logs directory. This log file contains progress information about sending test results from DTP to Jira. 

After DTP processes the report and sends results to Jira, 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"
     ]
}

Viewing Results in Jira and Xray

You will be able to view results in Jira after sending the test data. The following image shows a Jira story that contains several tests.

You can click on a test associated with the story to view additional details.

You can also drill into test executions associated with the test.

Viewing the Traceability Report 

If the External Application Traceability Report has been deployed to your system (see Enabling the Requirements Traceability Report), you can add widgets to your dashboard to monitor traceability from requirements to tests, static analysis, code reviews for your project. The widgets also drill down to a report that includes additional details.

Adding and Configuring the Widgets

The widgets will appear in a separate Traceability category when adding widgets to your DTP dashboard. See Adding Widgets for general instructions on adding widgets.

You can configure the following settings:

TitleYou can enter a new title to replace the default title that appears on the dashboard.
FilterChoose Dashboard Settings to use the dashboard filter or choose a filter from the drop-down menu. See Creating and Managing Filters for additional information about filters.
Target BuildThis should be set to the build ID you executed the tests and code analysis under. You can use the build specified in the dashboard settings, the latest build, or a specific build from the drop-down menu. Also see Configuring Dashboard Settings.
TypePie widget only. Choose either a Tests, Violations, or Reviews from the drop-down menu to show a pie chart detailing the status by type. Add instances of the widget configured to each type for a complete overview in your dashboard.
ProjectChoose a Jira project from the drop-down menu.

Requirements Widget

The widget shows the number of requirements from the specified Jira project.

Click on the widget to open the Requirement Traceability report.

Pie Widget

Unit testing, functional testing, static analysis, and peer reviews are common activities for verifying that requirements have been properly and thoroughly implemented. This widget shows the overall status of the project requirements in the context of those software quality activities. You can add a widget for each type of quality activity (tests, static analysis violations, reviews) to monitor the progress of requirements implementation for the project.

Mouse over a section of the chart to view details about quality activity type status. Click on the widget to open the Requirement Traceability report filtered by that type.

Requirements Implementation Status by Tests

Requirements Implementation Status by Violations

Requirements Implementation by Reviews

Understanding the Requirement Traceability Report

The report lists the JIRA requirements and data associated with them. 

You can perform the following actions:

  • Click on a link in the Key column to view the Requirement Details report for the requirement.
  • Click on a link in the Summary column or one of the Test columns to view the test-related information associated with the requirement in
  • the Requirement Details report.
  • Click on a link in one of the Files columns to view the static analysis-related information associated with the requirement in the Requirement Details report
  • Click on a link in one of the Reviews columns to view the change review-related information associated with the requirement inthe Requirement Details report.

Requirement Traceability Report by Type

Clicking on a section of the Requirements - Pie widget opens a version of the report that includes only the quality activity type selected in the widget. You can use the drop-down menus to switch type and status.

Understanding the Requirement details Report

The Requirement Details report provides additional information about the files and tests associated with the Jira requirement. You can open this report by click on a requirement in the Requirement Traceability report.

The first tab shows the results of the tests that were executed to verify the specific requirement. Click on a test name to view the test in the Test Explorer.

The second tab shows the files associated with the specific requirement, as well as the static analysis violation detected in the files. You can click the link the Violations column to view the violations in the Violations Explorer, which provides additional details about the violations.

If the files include any change reviews or review findings, they will be shown in the third tab with links to view them in the Change Explorer.

  • No labels