---
title: "Testing APIs using Katalon Studio"
canonical: "https://docs.getxray.app/space/XRAY/301477302/Testing%20APIs%20using%20Katalon%20Studio"
format: markdown
---
# Overview

In this tutorial, we will create some API tests using [Katalon Studio](https://www.katalon.com/).

Katalon Studio is a free tool that allows you to create an run automated Web, API and mobile tests using a UI that simplifies the writing of tests for non-developers.


> ℹ️ **Please note**
> ℹ️ 
> ℹ️ Katalon Studio is able of generating JUnit XML reports and this makes it possible to process and see those results in Xray.


# Requirements

- Katalon Studio

# Description

Katalon provides some sample projects, so you may create one using them as basis.

One of these templates is the "Sample JIRA API Tests Project", that includes a bunch of Jira REST API related test cases.

The new project will have some sample Test Suites, such as the Test Suites > Smoke Tests > Issue tests.


![image](media://9b9d9684-668a-4dee-b538-818f08befa3a)

Katalon is able to run the tests in console mode, enabling the generation of a JUnit XML report. Katalon's project and test suite must be identified along with the report folder path.


```
./katalon  -runMode=console -projectPath=/Users/smsf/Katalon\ Studio/exp2.prj -reportFolder=/tmp/ -reportFileName="report" -testSuitePath="Test Suites/Smoke Tests/Issue tests" -retry=0 -browserType=Chrome
```


After running the tests and generating the JUnit XML report (e.g., ), it can be imported to Xray (either by the REST API or through the **Import Execution Results** action within the Test Execution).


```
curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@/tmp/JUnit_Report.xml" "http://jira.example.com/rest/raven/1.0/import/execution/junit?projectKey=JIRAPI"
```


Each test case is mapped to a Generic Test in Jira and the **Generic Test Definition** field contains the full path of the Test within the "Test Cases" meta-folder in Katalon Studio.


![image](media://34f28f46-de4a-4621-a123-5a2a6fed1026)


In the Execution Details of the Generic Test, as the Context within the Results section, contains information about the full path of the Test Suite.

![image](media://c87a63d7-b4e2-48d1-a3d3-a1e3d4d43679)

# References

- [https://www.katalon.com/](https://www.katalon.com/)
- [https://docs.katalon.com/katalon-studio/docs/jenkins-integration.html](https://docs.katalon.com/katalon-studio/docs/jenkins-integration.html)