
My automation notes this time focus on one of the robust and popular automation frameworks, which is Katalon.
﷽
مَرْحَبًا يَا رَمَضَان I’m starting write my automation notes at the first of Ramadhan 1446H.
Katalon provides a comprehensive testing solution that covers web, API, mobile, and desktop applications.
- Web Testing, users can create automated test cases, debug efficiently, and execute tests across multiple browsers.
- API Testing allows for streamlined validation of various API architectures while integrating seamlessly with web and mobile testing.
- Mobile Testing supports automation for Android and iOS applications, ensuring compatibility across different devices, browsers, and operating systems.
- Desktop Testing enables testing of Windows applications, simplifying workflows and facilitating smooth transitions between different applications within a single tool.
This time I will focus on mobile testing.
Disclaimer I’m testing in my local machine using Mac M1. If you are using other OS, the steps, commands, and tools may be different.
Installation
To install Katalon, it’s very straightforward. In macOS you just to download it from here
then drag it to your applications folder. I’m using Katalon Studio Enterprise (Free trail version) as follow.
I’m facing some issues when to start Katalon Studio for mobile testing. Some issues are:
- Katalon Studio in Mobile Object Spy
- Issue: When click start in Mobile Object Spy, I encounter error
Unable to start application Reason: Fail to start Appium server in 60 seconds
I update all appium and node to the latest version as follow:
If you encounter issue like this:
you need to update the appium directory in Katalon Studio. In my case it’s in homebrew
Before this, I used the volta to manage my node and appium version. But this approach is not working for me.
Mobile Testing (Android)
After installing Katalon Studio, I’m able to start my first mobile test. To start a new test, I do some steps:
-
click on Katalon sample project
- click on
Sample Android Mobile Tests Project
wait until the project is loaded - Fill the fill new project form then click
OK
- click on
-
click Record Mobile
-
In the mobile recorder, you need to configure your device and the
apk
first.make sure you emulator or real device already attached and you could test by adb command
adb devices
if the device is not attached, you can try to click the
refresh button
-
After that you need to attach the apk file (like in the image above).
-
After that you can click
Start
button in the top of the mobile recorder. -
Wait for a while till the app successfully loaded.
-
After that you can start to record your test case. In my case, I’m try to search on the search bar. Click search text (marked in no 1) then click
Tap
(marked in no 2) then clickSet Text
(marked in no 3) fill the value toAndroid
. -
After that you can see the step already recorded.
in my case, I’m continue to create simple step to search and set text
Android
. I’m also try to use the Tap At Position
and lastly close the app.
- Here is the result of my test case
Passed
.
Mobile Testing (iOS)
-
click on Katalon sample project
-
click on
Sample iOS Mobile Tests Project
wait until the project is loaded -
Fill the fill new project form then click
OK
-
click Record Mobile
There is a little bit difference between
Android
andiOS
. IniOS
you need to selectiOS
simulator in theDevice Type
field without run the simulator first. -
click Start - Wait for a while till the app successfully loaded. - If you encounter issue like this:
some tips:
- Update the Appium log level to
Debug
in Katalon Settings Mobile. This will help you to debug the issue. - Follow some tips in the link common webdriveragent installation issues
- Update the Appium log level to
-
Now, you can start to record your test case.
-
Let’s do some simple test case, similar to Android above.
- Click on
Search Wikipedia
(marked in no 1). - Click
Tap
(marked in no 2). - The
Tap
action above will redirect to the Edit TextSearch Wikipedia
. - Click
Set Text
and fillAndroid
. - Finally, the Android result will appear.
- Now you can save the script, by click
Save Script
button.- In my case I name the testcase as
User able to search at EditText Search
.
- In my case I name the testcase as
- So when click
Run
button, the choose IOS simulator will appear. - Finally, the result will appear.
That’s it my notes.
- Click on
-