Tutorial automation api test with katalon

Fadhila Rizki Anindita
5 min readFeb 8, 2025

Hi guys, back again with tutorial automation api test. Recently exicited with api test because simple thing but critical. Okay we will learn about katalon, happy able to explore katalon again after long time ago used katalon. I will not share about record katalon api, because there are no tools about it. Don’t worry I use katalon free trial, so we able to utilize katalon as much as possible. This tutorial less code, more click, and boom automatically generated script. Yeah this is one of advantage katalon.

We will automate api https://openweathermap.org/api. Especially API geo (http://api.openweathermap.org/geo/1.0direct?q={country}&appid={appid}), weather (https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={appid}), forecast weather 5 days (https://api.openweathermap.org/data/2.5/forecast?lat={lat}&lon={lon}&appid={appid}), forecast air pollution (http://api.openweathermap.org/data/2.5/air_pollution/forecast?lat={lat}&lon={lon}&appid={appid}). There are appid for every user, so please signup & sigin first. Make sure you have download & install katalon, if no please visit https://katalon.com/download. Okay let’s start.

1. Open katalon

2. Click File > New > Project

3. Input Project Name, Select API/WEB Service for type, Click OK

4. Add request in folder object repository. Collect every end point to folder. To add folder in object repository, you able to click right in object repository, New > Folder. To add request in object repository, you able to click right in object repository, New > Web Service Request. Then you will see like this. Every folder create end point valid & invalid.

5. To save global variable in katalon, go to profile default in left side. Add global variable one by one. After it, you will see like this.

6. Input end point in every request one by one. Don’t forget to add variable in tab variable.

  • request lat & lon code
  • request without app id
  • request current weather
  • request without lat
  • request forecast weather
  • request without lon
  • request forecast air polution
  • request wrong url

7. Let’s try to send request. Click button run.

8. Create test case. Collect every test case to folder. To add folder in test case, you able to click right in test cases, New > Folder. To add request in object repository, you able to click right in test cases, New > Test Case. Then you will see like this. Every folder create test case valid & invalid.

9. Validate response code & response body every test cases. In test cases add web services keyword.

-Select item ‘send request’. Select object based on name of test case. Fill output with ‘response.’

-Select item ‘verify response status code’. Fill input column like this picture. In other test case fill value of param name expected status code based on response code every request.

-Select item ‘contains string’. Fill input column like this picture. In other test case fill value of param name string based on response body every request.

  • Select item ‘verify equal’. Fill input column like this picture. In other test case fill value of param name string based on response body every request.

- If you click script, it generate script.

10. Run test case.

11. Create other test cases like step 9, and run to verify other test cases passed.

12. Create test suite for generate report, move test cases to test suite. Click right Test Suite > New Test Suite. Click add to add test cases

- Select all test cases > Click OK

13. Run test suite and you will see the result.

14. See report in folder report.

- for open report, go to file explorer, search folder report in folder project katalon.

- click folder report, click folder date when run test suite first time, click folder api, click folder date when run test suite first time.

- click file date when run test suite first time, open with browser.

That’s all for this tutorial. You able to see complete code in repository https://github.com/fadhilara/KatalonAPI. If any error & feedback please let’s me know. Hope it able help you to learn automation. Stay tune in other tutorial automation.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Fadhila Rizki Anindita
Fadhila Rizki Anindita

No responses yet

Write a response