API Testing Tool Katalon Studio Review:
With the need to implement API automation tests for my projects, I have reviewed and developed proof of concept (POC) using various tools and testing frameworks.
Honestly, it is a very challenging task to decide on the most suitable tool for my team of one senior QA and four junior QAs. There are several tools that can help with creating robust, light and maintainable scripts. However, they require technical skills. Other alternatives are easier to use but create brittle and temperamental tests.
What You Will Learn:
Why Katalon Studio?
It is common for any specific tool to have both pros and cons.
Rest-assured is my favorite tool for API testing using Java. It leverages the power of Java to provide a robust and flexible method for testing API. Unfortunately, I quickly recognized that Rest-assured that it requires solid programming skills to perform API testing.
It seems that only the senior QA in the team could perform the test. How about the other members? The tool is useful, but may not be a good choice for my team.
I have tried out the other tools with good GUI so that all my team members can participate in doing automation tests, which in turn is a critical point. I have been using a simple yet strong automation testing tool named Katalon Studio.
I chose this tool for the following reasons:
- UI capabilities to visualize automation test scenarios.
- Built-in keywords to reduce the effort of creating new tests from scratch.
- Dual manual and scripting modes to accommodate different skill levels of the team.
- BDD Cucumber support.
- Easy to install and use for both technical and non-technical testers.
- Cross-platform and multiple mobile devices are supported. It works on the most common operating systems and browsers.
- It handles different types of testing including API, Web UI, and mobile.
- It allows everyone in the team to collaborate and focus on their testing.
- A very active user community.
- It’s free.
Moving further, here I’m going to share what I have learned about Katalon Studio and how it fulfils my team’s testing needs.
You can read other tutorials on Katalon Studio:
Part 1 – Katalon Studio Review
Part 2 – Katalon Studio Tutorial
Part 3 – Making API Testing Simple with Katalon Studio (This Tutorial)
Installation of Katalon Studio
The installation of Katalon studio is super easy and straightforward with just two steps:
- Download the tool from here
- Launch and activate using a valid email address.
Create an API Test
#1) Let’s create a test project:
Go to File => New => Project
Enter the project name and its location to create a new project.
The project’s predefined folder structure is created to store different elements that are shown in the Tests Explorer panel. Three important folders include Test Cases, Object Repository, and Test Suites.
Object Repository is the place to store all information of Web service endpoints (or requests) including request methods, URL, header, content, and authentication.
Test Cases are where all test scenarios are located and grouped. Each test case consists of test steps demonstrating a test scenario.
Test Suites contain all test suites which are a collection of test cases verifying a specific target. Test Suite Collection is a collection of test suites that verify a larger target.
#2) Create a Web service endpoint.
Katalon Studio stores all Web service endpoints in the Object Repository.
Select Object Repository => New => Web Service Request to create a new request.
In the “Create New Web Service Request” dialogue, enter the Name, Request Type, URL, and Description to create a request. You can choose either RESTful or SOAP request types.
Click OK. The following screen will be shown to allow for more requested details to be specified.
A few items that you need to specify for a RESTful request:
#1) Request Method
You can choose one of these four REST methods for the request: GET, POST, PUT, and DELETE.
The method should match the requested URL. In the example below, we use the GET method to get information of an existing ticket by the ID in JIRA.
#2) Request URL
The request URL specifies the request’s address (e.g. web server, port, and path).
#3) Authorization
Authorization is an essential part of an API. It is used to authenticate the user and access the request. Katalon Studio supports common authentication methods, one of which is basic.
The basic method requires a username and password. Make sure to click “Update to HTTP Header” so that the credentials are applied to the HTTP Header.
#4) Verification
Verification is used to define assertions to ensure that the response contains expected information.
The verification tab for a request is similar to the Script tab for a test case.
In other words, you can write custom scripts with built-in keywords or Groovy/Java scripts to verify the response data. In addition to built-in keywords, Katalon Studio provides built-in code snippets to help in generating assertions easily.
To include the verification script while sending the request, you need to choose the “Test Request and Verify” option (shown in the above screenshot). The verification scripts allow you to check the request status easily.
#5) Variables
Variables make API testing more robust and dynamic with a data-driven approach.
In Katalon Studio, every part of the request can be parameterized. In other words, you can define the variables for URL, Authentication, HTTP Header, and HTTP Body.
#6) Formatter
The response will be automatically displayed in a neat format in JSON, XML, HTML, or JavaScript. Formatter is useful for visualizing the response status.
Add an Existing Request to a Test Case
A request can be inserted into a test case using web service built-in keywords. There are certain keywords to send the request, to verify the response, and to make the request as a part of the bigger testing flow.
The following test case demonstrates how to address a request with verification steps:
The test case can be executed as usual. Each verification step can be viewed from the Log Viewer.
Add Test Cases to Test Suite
You can add a test case to a test suite by either using the drag-and-drop or the “Add test case” function.
Once test cases are added to the test suite, you can execute the test suite by clicking on Run (without selecting a browser to run as in Web UI testing)
Next Steps
After creating test cases for API testing using the steps above, you can modify your test cases to reflect the real testing needs of your project in a better way.
Katalon Studio allows you to:
- Parameterize your tests.
- Apply a data-driven approach.
- Create custom keywords/packages.
- Called for tests and reused code.
- Include error handling.
- View test reports after test suite execution.
BDD Cucumber Support
Katalon Studio has recently released a new version to support BDD Cucumber.
BDD Cucumber is a testing approach in which test cases are written in natural languages. Hence, test cases can be prepared by the team members with different skills, both technical staff, and business stakeholders.
BDD Cucumber also helps to create test scenarios for the acceptance test phase.
Katalon Studio’s UI/UX
Katalon Studio currently provides a good UI/UX for testers with little to average programming skills. They can easily use features such as built-in keywords, drag, and drop, or search and select test cases for reuse.
However, using these features can be time-consuming for experienced automation testers. It would be great if Katalon Studio focuses more on improving the scripting experience.
Conclusion
After trying Katalon Studio API testing features, I am quite satisfied with the result as it suits my team of both automation and manual testers. We can use Katalon Studio for API testing as well as Web UI testing.
You can use download Katalon Studio for free and try hands-on.
Feel free to share your thoughts about this API testing tool in the comments section below!
Thanks for the detailed tutorial. It’s good tool.
This is nice tool.
Can you please share some documents on this
Thanks in advance
Is it possibe to do Json schema validation in Katalon studio?
What are the +s using Katalon studio for API automation than Collections in Postman?
do we have Jenkins integration? and Git?
Data from Excel , CSV import automatically once specify the path , if any changes in sheet in coulmns or rows should reflect automatically , this facilities required
The new age advanced automation testing tools like Katalon Studio and Qara Test are revolutionizing the software testing scenario today.
Great! Tool Thanks for sharing this information I am so very happy to read this content
Have you tried to set your acce token to be a global variable. I am trying to do something like this in the HTTP Header window/editor
Authorization Bearer $(accessToken)
The accessToken is a global and passed from command line.
Appreciate any help.