Skip to content

Latest commit

 

History

History
222 lines (153 loc) · 6.26 KB

xray-exporter.adoc

File metadata and controls

222 lines (153 loc) · 6.26 KB

Xray Exporter

Xray Exporter is a tool used to export test cases into Jira Xray Plugin.

Features:

  • Create and update manual and cucumber test cases

  • Set Jira labels for test cases

  • Set Jira components for test cases

  • Link test cases to stories they belong to

Xray Export Properties

Note
The properties marked with bold are mandatory.

General

Property Required Description

xray-exporter.jira-instance-key

false

The key of the configured JIRA instance, in case of missing value it will be evaluated automatically based on issue keys being exported

xray-exporter.json-results-directory

true

Path to directory with test execution JSON results.

The path is managed by the bdd.report-directory property which default value is output/reports/jbehave relatively to the tests directory.

Please make sure that the bdd.configuration.formats property includes JSON value in order to generate test execution results.

xray-exporter.project-key

true

Key of a Jira project where new test cases should be created

xray-exporter.assignee

false

Username of Jira user that will be used as assignee for newly created test cases

xray-exporter.editable-statuses

false

Statuses of test cases allowed to update

xray-exporter.test-set-key

false

The key of a Test Set to which the exported test cases will be added

xray-exporter.test-case-updates-enabled

false

By default, the content of Test Cases that have associated IDs, is updated every export run, to disable this behavior set the value of this property to false

xray-exporter.test-execution-attachments

false

Comma-separated list of file and folder paths that should be uploaded to test execution as attachments. Please note that regular files like images, texts are uploaded as is, whereas folders are archived before the upload.

application.properties
xray-exporter.project-key=ABBA
xray-exporter.json-results-directory=/Users/happytester/Repositories/app-tests/output/results/jbehave

Test Execution

Property Required Description

xray-exporter.test-execution-key

false

The key of Test Execution which the exported test cases along with their statuses will be added to

xray-exporter.test-execution-summary

false

The Test Execution summary

Test execution import varies depending on values in xray-exporter.test-execution-key and xray-exporter.test-execution-summary, the following matrix shows this behavior change:

Configuration Result

Both xray-exporter.test-execution-key and xray-exporter.test-execution-summary are set

Test execution summary and associated test cases will be updated, the update of test cases is performed according to following rules:

  • new test cases are added to the test execution

  • statuses of existing test cases are updated

Only xray-exporter.test-execution-summary is set

New test execution will be created

Only xray-exporter.test-execution-key is set

Associated test cases will be updated according to following rules:

  • new test cases are added to the test execution

  • statuses of existing test cases are updated

Neither xray-exporter.test-execution-key nor xray-exporter.test-execution-summary are set

Text execution import is skipped

Jira Fields Mapping

The Xray is a Jira plugin that uses custom Jira fields for it’s data, one of the ways to find out custom field names for particular field used by Xray on Jira UI (if access to Jira configuration is prohibited) is to request description of some issue like https://jira.example.com/rest/api/latest/issue/DUMMY-1.

Manual Test Case Properties

Manual test case view

Index Property Description

1

jira.<jira-instance-key>.fields-mapping.test-case-type

Key of a field containing test case type

2

jira.<jira-instance-key>.fields-mapping.manual-steps

Key of a field containing collection of manual steps

mapping.properties
jira.<jira instance key placeholder>.fields-mapping.test-case-type=customfield_10001
jira.<jira instance key placeholder>.fields-mapping.manual-steps=customfield_10002

Cucumber Test Case Properties

Cucumber test case view

Index Property Description

1

jira.<jira-instance-key>.fields-mapping.test-case-type

Key of a field containing test case type

2

jira.<jira-instance-key>.fields-mapping.cucumber-scenario-type

Key of a field containing type of cucumber scenario

3

jira.<jira-instance-key>.fields-mapping.cucumber-scenario

Key of a field containing body of cucumber scenario

mapping.properties
jira.<jira instance key placeholder>.fields-mapping.test-case-type=customfield_10003
jira.<jira instance key placeholder>.fields-mapping.cucumber-scenario-type=customfield_10004
jira.<jira instance key placeholder>.fields-mapping.cucumber-scenario=customfield_10005

Scenario Meta Attributes

Name Example Description

testCaseId

@testCaseId STUB-0

Map scenario to Jira test case in 1 to 1 relation

requirementId

@requirementId STUB-0

Link scenario to Jira issue with "Tests" link type in 1 to 1 relation

xray.labels

@xray.labels label-1;label-2

Set labels to the exported test case

xray.components

@xray.components component-1;component-2

Set components to the exported test case

xray.skip-export

@xray.skip-export

Skip test case while exporting