Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


CI in a project using non-Cucumber tests

Sometimes, you may be using automated tests that are not Cucumber. You may even be using your own custom test automation framework.

In this case, Test entities must have already been created in Jira. Tests can either be Manual or Generic, depending if they're structured (composed of steps) or not.

In general, the steps are: 

...

If you are using any other framework to specify your test cases, you can also use a CI tool to import the execution results into Xray and Jira.

Xray supports the most common Test Runner reports when importing execution results. These are listed bellow:

  • JUnit
  • TestNG
  • NUnit

If the Test cases being imported are not yet created in Xray/Jira, then Xray will create them automatically. The created tests will have the Generic test type and will contain the identifier or the name in the definition field. Xray will reuse the same Test issues in JIRA for subsequent imports of execution results.

Only one additional step is needed in order to import the execution results using the test runners specified above:

  1. Run the Tests

  2. Authenticate with the Xray REST API

  3. Import the results back into Jira

Authenticate base on the credentials associated with a given API Key

No Format
token=$(curl -H "Content-Type: application/json" -X POST --data '{ "client_id": "${***}","client_secret": "${***}" }' https://xray.cloud.xpand-it.com/api/v1/authenticate| tr -d '"')


Import the test results to Jira

No Format
curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer ${token}" --data @report.xml https://xray.cloud.xpand-it.com/api/v1/import/execution/junit

...