2

I would like to know if there is the option of integrating automated test cases with zephyr de jira.

Currently, I have a battery of automated tests in robot framework. In parallel, I have the test cases defined in Zephyr for jira. I would like to be able to launch the execution of the automated test cases from Zephyr or else, that the result of the executions will be reflected in the Zephyr test cases.

Thank you.

Marta79
  • 91
  • 1
  • 3
  • 14

1 Answers1

0

You need to parse output.xml file generated by Robot Framework to get results of your test suite. Alternatively JUnit xml reporting file may be generated by using -x parameter:

robot -x junit.xml test1.robot

To update results in Zephyr test cases use ZAPI for Jira. Please check https://getzephyr.docs.apiary.io.

Execution status update

Find test case id (issue id) by test case name (issue key):

https://<jira_server>/rest/api/2/issue/<test_case_name>

Find execution id by test case id:

https://<jira_server>/rest/zapi/latest/execution?issueId=<test_case_id>

Request:

PUT https://<jira_server>/rest/zapi/latest/execution/<execution_id>/execute

Headers:

Content-Type: application/json

Body:

{
  "status": "1"
}

Status "1" is for PASS.

Step status update

Find step id by execution id:

https://<jira_server>/rest/zapi/latest/stepResult?executionId=<execution_id>&expand=

Request:

PUT https://<jira_server>/rest/zapi/latest/stepResult/<step_id>

Headers and body the same as above.

Community
  • 1
  • 1
King
  • 29
  • 1
  • 8