API Testing Tool Katalon Studio Review:
With the need for implementing API automation test for my projects, I have reviewed and developed proofs 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. The 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 requires a solid programming skill 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 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 fulfills my team’s testing needs.
You can read other tutorials on Katalon Studio:
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 is 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 which 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’ dialog, enter 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 more request details to be specified.
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 request 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).
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, and one of which is basic.
The basic method requires username and password. Make sure to click ‘Update to HTTP Header’ so that the credentials are applied to ‘HTTP Header’.
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. Besides built-in keywords, Katalon Studio provides built-in code snippets to help in generating assertions easily.
To include verification scripts 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.
Variables make API testing more robust and dynamic with the 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.
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 call a request with verification steps:
The test case can be executed as usual. And 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 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)
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 data-driven approach.
- Create custom keywords/packages.
- Call tests and reuse 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 searching and selecting 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.
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 free download Katalon Studio and try hands-on.
Feel free to share your thoughts about this API testing tool in the comments section below!
Last Updated: November 10, 2019 6:20 am