Pass Katalon Test Case ID into JIRA

Hi team,

I am trying to create JIRA Test cases via Katalon. Instead of fixed values, I want to parameterise the creation of test cases into JIRA with the same ID as Katalon test cases.
Example: I have created a Katalon test case called “Verify PDF”. I wanted to create a test case in JIRA with the same name. However, I wanted to put this under “Keywords” or “Test Listeners”, I need this to be dynamic in such way that it captures different test case names.

Here is my test case to integrate with JIRA:

def create_issue = WS.sendRequest(findTestObject(‘JIRA/Create issue type’, [(‘project_key’) : GlobalVariable.JIRA_Project_Key
, (‘summary’) : findTestCase.name, (‘description’) : ‘Creating of an issue using project keys and issue type names using the REST API’
, (‘issue_type’) : ‘Test’, (‘priority’) : ‘Major’, (‘authorization’) : GlobalVariable.JIRA_Authorisation]))

I got it working with this:

TestCaseContext currentTestCaseID = testCaseContext.getTestCaseId()

Just let me add reference to Can we get testcase name from code ?

1 Like