We have come up with this tutorial to guide you on test automation for JIRA with Katalon Studio.
Before we start talking about JIRA integration, we will have a quick overview of both the tools – Katalon Studio as well as JIRA.
Katalon Studio – Overview
Katalon Studio is a simple, powerful and a completely free automation solution for the web, Android, iOS and API testing on Windows and macOS.
It is simple to use, with cross-platform support and built-in JIRA integration. You can setup projects, create tests, run tests, view reports and maintain tests very easily using Katalon Studio.
What You Will Learn:
- Jira Integration with Katalon Studio
- Katalon Studio’s main features
- JIRA – Overview
- Benefits of JIRA add-on
- Installation of Katalon’s JIRA add-on
- Gherkin Custom Field
- Katalon Studio – JIRA Integration: Configuration Steps
- Create Test Cases in Katalon Studio from JIRA Issues
- Submit Katalon execution results & logs to JIRA issues
- Submit Bugs to JIRA from Katalon Studio
- View Katalon Studio Test Execution result through JQL
- Recommended Reading
Jira Integration with Katalon Studio
(Note: Click on any image for enlarged view)
Katalon Studio’s main features
- It offers built-in project templates that allow you to organize test cases, object repository, and keywords quickly.
- It bundles with Selenium framework and stable web-drivers implementation to save time on installation.
- It is very easy to integrate Katalon Studio with Jenkins, GIT, JIRA, and qTest using the built in plugins.
- Recording and generating the tests automatically using recording utility and keywords.
- It also allows building advanced test scripts and doing
- Providing interchangeable codeless & coded test design.
- It has an intelligent object capturing feature that has an advanced recorder to detect object properties.
- Supporting page object, data-driven testing, BDD to increase productivity.
- It can execute tests using multiple configurations and data sets.
- Offering flexible execution modes –
- Remote execution can be done with CI integration console.
- Run tests on multiple browsers and OS.
- It has dynamic failure handling and auto re-execution feature.
- Viewing reports in multiple formats with advanced logging and screenshots
- It also offers team collaboration.
Visit Katalon Studio website here.
To explore more on Katalon Studio you may refer below STH posts:
- Testing Mobile Apps Using Katalon Studio & Kobiton’s Cloud-Based Device Farm
- Katalon Studio Tutorial: A Free Test Automation Tool You Have Been Waiting For
- How to Solve the Common Web UI Test Automation Problems Using the Katalon Studio Free Toolset
JIRA – Overview
As most of us already know, JIRA is one of the best tools to plan, track and release great software. It is widely used by agile teams.
We won’t go into much detailed talk here about JIRA itself. We are rather interested to learn about Katalon integration with JIRA. If you want to read in depth about JIRA, you can refer to STH JIRA Tutorials.
Katalon Studio offers a JIRA add-on. Let us move ahead and see how we can install and use Katalon’s JIRA add-on.
Benefits of JIRA add-on
The free JIRA add-on helps to create a seamless integration. The major benefits of JIRA add-on are:
- This add-on adds a custom field type to JIRA called Katalon Gherkin. It helps in designing test cases in consistent and concise manner. On adding Gherkin custom field, the content gets populated automatically into the Katalon Studio automation scripts.
- The latest test execution results and artifacts will be presented right on the issue page
- Using JIRA’s JQL syntax, it is easy to look up Katalon Studio execution result status.
Installation of Katalon’s JIRA add-on
Click here to get the Katalon BDD- Test automation for JIRA add-on. Currently, only JIRA server is supported.
You can follow the below steps for installation:
- You need to log into the JIRA instance as an admin.
- Click on the admin dropdown and choose Add-ons.
- From the left-hand side of the page, click on ‘Find new add-ons’.
- Search for ‘Katalon BDD – Test Automation for JIRA’. The results will show those add-on versions which are compatible with your JIRA instance.
- Click ‘Install’ to download and install the add-on.
- Upon successful installation, it will show ‘Install and ready to go’ dialog. Click close in the dialog.
- You are all set to use the add-on now!
Gherkin Custom Field
As we discussed above, upon finishing the installation, you will find that a custom field type called Katalon Gherkin is added to your JIRA instance. It will allow you to write the test cases’ description and stories in Gherkin syntax.
The Gherkin keywords like ‘Then’, ‘When’, ‘Given’ will be highlighted automatically. Once the issue is imported to Katalon Studio, the content of the Gherkin custom filed from JIRA will be populated into the Katalon test case description.
Follow these steps to add the Gherkin Custom field:
1) Choose ‘Issues’.
2) Select Fields -> Custom Fields and Click ‘Add Custom Field’.
3) Select ‘Advanced’. You will get below screen:
4) Select ‘Katalon Gherkin’ and click on next.
5) Configure the field.
6) Click on Create button.
7) Click on ‘Submit’ button to finish adding the Gherkin custom field.
The below screenshot shows an example of how the Katalon Gherkin custom field appears in the JIRA issue:
Refer below link to learn more about adding and configuring custom fields in JIRA:
Katalon Studio – JIRA Integration: Configuration Steps
1) In Katalon Studio, go to Project -> Settings -> Integration -> JIRA
2) Check Enable Integration Option. The settings will be available for configuration.
3) Specify the server URL, username, and password. Click on connect button.
4) After establishing a successful connection with JIRA, all relevant JIRA projects and issue types will be displayed under submit options. You can select the default JIRA project and issue type for submission here.
Below are the details of submitting options:
|Default JIRA Project||The default JIRA project to submit a ticket.|
|Default JIRA Issue Type||The default JIRA Issue type to create when submitting a ticket.|
|Use Test Case name as Summary for JIRA ticket||The Katalon Test Case Name will be used as a summary for the submitted ticket.|
|Attach Screenshot to JIRA ticket||Any taken screenshot during execution will be included in submitted ticket.|
|Attach Log to JIRA ticket||The execution log will be included in the submitted ticket.|
In the latest Katalon version (4.7), we also have a submit option – ‘Automatically submit test result’. Selecting this option will submit the Katalon test execution result automatically to the linked JIRA ticket.
5) Once you have selected the submit options, click on ‘Apply’ and then ‘OK’ button to complete the JIRA integration setup.
Create Test Cases in Katalon Studio from JIRA Issues
Once the JIRA integration setup is done, JIRA icon will be available on Katalon Studio menu bar.
Follow the steps below to sync Test Cases from JIRA to Katalon Studio:
1) From JIRA, prepare the JIRA JQL script.
JQL is JIRA Query Language used in the advanced search.
For example, if you want to see sorted search results, you can use ORDER BY clause in JQL query. JQL is not a database query language. However, it is the SQL-like syntax.
A sample JQL is shown in below screenshot.
2) Now click on JIRA icon from the Katalon Studio menu bar.
3) Upon clicking the JIRA icon, import JIRA dialog will be displayed.
4) Enter the JIRA JQL we prepared in step 1 in the dialog.
Click on ‘OK’ Button. Based on your JQL, Katalon Studio will sync all the JIRA test cases.
5) Once you click on ‘OK’ in step 4, you will be asked to choose the destination for new issues. Here you can mention the location for syncing JIRA test cases. You can either specify the location manually or Katalon will automatically generate a default location.
Choose a destination and click ‘OK’.
6) The syncing process now done and now you can go to ‘Tests Explorer’ of Katalon Studio to check if the JIRA test cases have been synced properly.
Submit Katalon execution results & logs to JIRA issues
Katalon Studio test execution results are automatically synced with the associated JIRA issues. Right inside JIRA, you can review the status and attachments (logs) of Katalon Studio test cases under the ‘Katalon Execution Result’ section as highlighted in below screenshot, showing that the status is ‘Passed’ and the execution log is included in Attachments.
Submit Bugs to JIRA from Katalon Studio
Submit options will be available in Katalon Test Reports after JIRA Integration setup is done.
Follow below steps to submit Bugs in JIRA from Katalon Studio:
1) In Reports, open a test execution that you want to review for issues. In the below screenshot, you can see that a dedicated column for JIRA integration is enabled in Test cases table. Corresponding to each failed test case, it says ‘Click to Manage JIRA issues’.
2) Click on the JIRA bug icon (as shown above). Upon clicking, you will be displayed a list of linked JIRA issues corresponding to the Test Case.
No JIRA issue is currently linked with this Test Case. Now, we will add and submit an issue to JIRA.
3) Go to ‘Add’ and select ‘Create as New’.
We have 3 submitting options – ‘Create as New’, ‘Create as sub issue’ and ‘Link to Existing Issue’. Let’s have a brief description of each of these options:
Create as New:
In this case, a new issue will be submitted to JIRA.
Create as sub issue:
Here, a sub task of an existing JIRA issue will be created. You will be asked to enter the Parent JIRA issue ID for submitting sub task.
Link to Existing Issue:
Selecting this option will append the test case execution details to an existing JIRA issue.
You will be asked to enter the existing JIRA issue ID for linking.
4) As we have selected ‘Create as New’ option in step 3, we will be displayed a JIRA native submission form. See below screen shot as an example:
Based on your preferences in JIRA integration settings, the summary, screenshot, and logs will be populated automatically in the above screen.
5) After ensuring that all the necessary details are filled, click on the ‘Create’ button present at the bottom of the form.
6) You will be displayed the newly created Jira issue under the Linked JIRA issues section. You can see the ID, summary, and status of the issue. Clicking on the ID will directly take you to the JIRA issue.
View Katalon Studio Test Execution result through JQL
Using, JQL syntax, Katalon Studio test execution result can be queried from JIRA. The syntax is as below:
Where the status value can be ‘PASSED’ (the automation tests have been executed successfully), FAILED (the automation tests have been failed at certain steps), INCOMPLETE (the automation tests where one or more steps have got left unexecuted), ERROR( the automation tests in which some errors occurred).
For example, to view all test cases that have ‘ERROR’ in Katalon, you can use the highlighted JQL below in JIRA search:
Hope this tutorial was helpful for you to learn the integration of Jira with Katalon Studio. The tutorial explains in detail how to submit Jira bugs automatically with information generated by Katalon Studio.
You try this by downloading the Katalon Studio for free from here.
Let us know if you have any queries.