In this section:

Connecting DTP to Jira

  1. Choose Report Center Settings from the settings (gear icon) menu.
  2. Choose External System, click Edit Settings, and choose Jira from the System type 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, for example, http://jira.yourcompany.com:8080Do not include paths or parameters.
  6. The Display URL field defines the URL which is displayed in Parasoft DTP pages when links to your Jira system are presented in a web browser. Typically, this should be the same as the above Application URL field. However, it might be different, for example, when you work in a reverse proxy environment and links to Jira from the user's local web browser with Parasoft DTP are different than from the Parasoft DTP server, for example, 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. (Optional) You can enter a JQL query to filter the Jira requirements presented in Parasoft IDE plug-ins and Jira traceability reports. The JQL query applies to requirements in Jira projects that have been associated with DTP projects (see Associating Parasoft Projects with Jira) and to requirements that have been customized with the jira.issueType.requirement setting (see Advanced Configuration). This query will be overwritten by any JQL queries defined in the Jira dashboard widgets (see Adding and Configuring the Widgets).    
  9. Click Test Connection to verify your settings and click Confirm.

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 Sending results from DTP to JIRA/Xray.

Refer to the Xray documentation for information about generating client IDs and secrets: https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys

Associating Parasoft Projects with Jira

Associating a Parasoft project with a Jira project enables you to create defects from the Violations or Test Explorer views that are linked to the correct project in Jira. The association is also important when using the Configuring Parasoft to Jira Traceability. 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.

  1. Click Create Project Association and choose a project from the DTP Project 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 reconfigure an existing association between DTP and Jira projects:

  1. Click the pencil icon and choose either a different DTP project from the menu or specify the name of a different Jira project in the External Project field.
  2. Click Save

Advanced Configuration

You can modify the ExternalSystemSettings.properties configuration file located in the <DTP_DATA_DIR>/conf directory to change the default behavior of the integration. DTP's out-of-the-box integration with Jira/Xray is configured to use default or commonly used fields and types. If you customized your Jira/Xray system, however, then you can configure the settings detailed below to align data in DTP with your custom Jira/Xray configuration.

Please note that ExternalSystemSettings.properties is expected to use ISO 8859-1 (Latin1) character encoding. Any character not supported by ISO 8859-1 must be represented in keys and elements using Unicode escape sequences, which is to say a backslash (\) and a lowercase u, followed by the four-digit hexadecimal code for the character. For example, the "En Dash" (–) character (not to be confused with the "Hyphen-Minus" character (-)) is not supported by ISO 8859-1, so it must be represented by its Unicode escape sequence \u2013. As a result, something like example.property.value=Foo – Bar would need to be entered as example.property.value=Foo \u2013 Bar.

jiraIssueUrl

Specifies the URL template for linking work items created in the DTP Violation Explorer and Test Explorer to work items in Jira.

Default:

JiraIssueUrl=<JIRA_URL>/browse/<ID> 

The value of the <JIRA_URL> segment of the URL path is specified when connecting DTP to Jira. See Connecting DTP to Jira.

jira.issueType.bug

Specifies the name for the issue type in Jira that takes the role of bugs when creating work items from the DTP Violations Explorer and Test Explorer.

By default, the property is not set. As a result, bug work items created in DTP are associated with bug work items in Jira.

jira.issueType.task

Specifies the name for the issue type in Jira that takes the role of tasks when creating work items from the DTP Violations Explorer and Test Explorer.

By default, the property is not set. As a result, task work items created in DTP are associated with task work items in Jira.

jira.issueType.test

Specifies the name for the issue type in Jira that takes the role of tests. When test results are sent from DTP to Jira/Xray, tests will be labeled as the issue type specified in this setting.

Default:

jira.issueType.test=Test 

This setting can be used in on-premises and cloud-based instances of Jira/Xray.

jira.issueType.requirement

Specifies the entity type in Jira that DTP treats as requirements. DTP will present Jira entities specified with this setting in traceability widgets and reports. When sending test results from DTP to Jira/Xray, DTP will update or create test cases for the entities specified with this setting that match the IDs specified with the @req annotation. 

Default: 

jira.issueType.requirement=Story 

This setting can be used in on-premises and cloud-based instances of Jira/Xray.

jira.testDone.transitionId

Specifies a custom status for tests sent from DTP to Jira/Xray. If not specified, the default system status for completed tests is used.

See Getting Default Test and Test Execution Statuses for information about getting the default test status names used in your system.

jira.testExecutionDone.transitionId

Specifies a custom status for test executions sent from DTP to Jira/Xray. If not specified, the default system status for test executions is used.

See Getting Default Test and Test Execution Statuses for information about getting the test execution status names used in your system.

jira.testType.customfieldId

Specifies the ID of the test type custom field in your Jira/Xray system. The value should match the existing custom field. Tests will be labeled according to the type specified with the jira.testType.customfieldValue setting. 

Both the jira.testType.customfieldId  and jira.testType.customfieldValue settings must be configured to specify a custom value. 

By default, both jira.testType.customfieldId and jira.testType.customfieldValue settings are not configured. As a result, the default test type value is used

See Getting Values for Custom Test Type Fields for additional details.

This setting can be used in on-premises and cloud-based instances of Jira/Xray.

jira.testType.customfieldValue

Specifies which test type is assigned to tests created when results are sent from DTP to Jira/Xray. The value should match the existing custom field in your Jira/Xray system. The custom value is identified by the ID specified in with the jira.testType.customfieldId setting.

Both the jira.testType.customfieldId  and jira.testType.customfieldValue settings must be configured to specify a custom value. If only the jira.testType.customfieldId  or jira.testType.customfieldValue settings are configured, will result in an error.

By default, both jira.testType.customfieldId and jira.testType.customfieldValue settings are not configured. As a result, the default test type value is used. 

See Getting Values for Custom Test Type Fields for additional details. 

This setting can be used in on-premises and cloud-based instances of Jira/Xray.

jira.xrayOnPremises.testCaseFindingStatus.pass

Specifies the test run status name in Jira/Xray to assign to passing test results sent from DTP. This enables you to set custom statuses you may have configured in Jira for test results in DTP.

Default:

jira.xrayOnPremises.testCaseFindingStatus.pass=PASS 

This setting can be used in on-premises instances of Jira/Xray.

jira.xrayOnPremises.testCaseFindingStatus.fail

Specifies the test run status name in Jira/Xray to assign to failed test results sent from DTP. This enables you to set custom statuses you may have configured in Jira for test results in DTP.

Default:

jira.xrayOnPremises.testCaseFindingStatus.fail=FAIL 

This setting can be used in on-premises instances of Jira/Xray.

jira.xrayOnPremises.testCaseFindingStatus.incomplete

Specifies the test run status name in Jira/Xray to assign to passing test results sent from DTP. This enables you to set custom statuses you may have configured in Jira for test results in DTP.

Default:

jira.xrayOnPremises.testCaseFindingStatus.incomplete=ABORTED 

This setting can be used in on-premises instances of Jira/Xray.

jira.xrayOnPremises.testToRequirementRelationName

Specifies the name of the requirement type in Jira for tests sent from DTP. This enables you to associate tests with requirements using a custom name you may have configured in Jira. 

Default:

jira.xrayOnPremises.testToRequirementRelationName=Tests 

This setting can be used in on-premises instances of Jira/Xray.

jira.xrayCloud.testCaseFindingStatus.pass

Specifies the test run status name in Jira/Xray to assign to passing test results sent from DTP. This enables you to set custom statuses you may have configured in Jira for test results in DTP.

Default:

jira.xrayCloud.testCaseFindingStatus.pass=PASS 

This setting can be used in Cloud instances of Jira/Xray.

jira.xrayCloud.testCaseFindingStatus.fail

Specifies the test run status name in Jira/Xray to assign to passing test results sent from DTP. This enables you to set custom statuses you may have configured in Jira for test results in DTP.

Default:

jira.xrayCloud.testCaseFindingStatus.fail=FAIL 

This setting can be used in Cloud instances of Jira/Xray.

jira.xrayCloud.testCaseFindingStatus.incomplete

Specifies the test run status name in Jira/Xray to assign to passing test results sent from DTP. This enables you to set custom statuses you may have configured in Jira for test results in DTP.

Default:

jira.xrayCloud.testCaseFindingStatus.incomplete=ABORTED 

This setting can be used in Cloud instances of Jira/Xray.

jira.xrayCloud.testToRequirementRelationName

Specifies the name of the requirement type in Jira for tests sent from DTP. This enables you to associate tests with requirements using a custom name you may have configured in Jira. 

Default:

jira.xrayCloud.testToRequirementRelationName=Test 

This setting can be used in Cloud instances of Jira/Xray.

Getting Values for Custom Test Type Fields

The jira.testType.customfieldId  and jira.testType.customfieldValue settings are used to specify a custom type for tests sent to Jira/Xray from DTP. The jira.testType.customfieldId setting identities the name of the field for the custom type, and the jira.testType.customfieldValue setting identifies the specific value. Both values must exist in your Jira/Xray system.

To get the value for the jira.testType.customfieldId  setting:

  1. Send a GET request to the following endpoint to get the value of the custom field: 

    curl -X GET "http(s)://<jira-host>/rest/api/2/field"
  2. Locate the custom field object with the Test Type property in the response:
  3. Set the jira.testType.customfieldId setting to the id property:
jira.testType.customfieldId=customfield_10800

To get the value for the jira.testType.customfieldValue setting:

  1. Log into your Jira system and click Create in the Jira toolbar.
  2. Choose Test (or equivalent) from the Issue Type menu and click Test Details.
  3. Open the Test Type menu and copy the type that you want to use for tests sent from DTP.

     
  4. Set the jira.testType.customfieldValue property to the test type value:
jira.testType.customfieldValue=Automated[Generic]

Save the ExternalAppsSettings.properties configuration file to apply the changes.

Getting Default Test and Test Execution Statuses

The jira.testDone.transitiondId and jira.testExecutionDone.transitionId settings are used to specify a custom status for tests and test executions sent to Jira/Xray from DTP. You can use the Jira REST API to get the status names to use in the ExternalAppsSettings.properties file so that the data sent from DTP matches the existing entities in Jira.

Send a request to the following Jira transitions endpoint and specify the Jira test ID to determine the correct value for jira.testDone.transitiondId setting:

curl -X GET "http(s)://<jira_host>/rest/api/2/issue/<testId>/transitions" 

The ID, as well as the status name, will appear in the response:

Specifying the ID in the ExternalAppsSettings.properties file:

jira.testDone.transitiondId=41

Send a request to the following Jira transitions endpoint and specify the Jira test execution ID to determine the correct value of their jira.testExecutionDone.transitiondId setting: 

curl -X GET "http(s)://<jira_host>/rest/api/2/issue/<testExecutionId>/transitions" 

The ID, as well as the status name, will appear in the response:

Specifying the ID in the ExternalAppsSettings.properties file:

jira.testExecutionDone.transitiondId=31

  • No labels