0

I have some test cases written in Katalon. I need to execute them from Katalon and mark directly to Zephyr in already created test cycle. Please provide any step-by-step guide to implement this Katalon-Zephyr integration.

OsamaA
  • 451
  • 1
  • 8
  • 13

1 Answers1

0

I haven't used Katalon for a while (using Cypress now) but I answered the same in the Katalon forum. You need to use the API from the Zephyr Apiary: https://getzephyr.docs.apiary.io/#reference/executionresource/update-execution-details/update-execution-details

Steps below:

  1. Create a web service request under Object repository (let’s call it ZAPI- Update Execution Details) using ZAPI API: http://test123.atlassian.net/rest/zapi/latest/execution/15/execute
  2. Include the code below inside @AfterTestCase under the Test Listeners:

.

String statusID = '' 
if(testCaseContext.getTestCaseStatus().equalsIgnoreCase('PASSED')){
 statusID = '1' //1 is the code for PASSED in Zephy
}else{ //default to Failed
 statusID = '2' //2 is the code for FAILED in Zephyr
}
def update_test_execution_status = WS.sendRequest(findTestObject('ZAPI-Update Execution Details', [('exId') : '15', ('exStatus') : statusID]))

Note: For now, I only included the following status: PASSED and FAILED; Test execution ID is different from Issue Type ID.

ebanster
  • 886
  • 1
  • 12
  • 29