Below are the steps to execute the script or automation of the Android app using Katalon Studio on Windows 10. But there are few prerequisites for the same.
Subsequently, we will be covering the below topics in this article:
- How to Install Katalon Studio?
- How to Install NodeJS?
- How to install Appium?
- How to enable developer mode on Android Device?
- How to Install Text Execution?
How to Install Katalon Studio?
Firstly, you have to set up Katalon Studio. Subsequently, you can download and install Katalon Studio from https://www.katalon.com/.
How to Install Node JS?
Node js – Consequently, you can download and install Node.js from https://nodejs.org/en/download/
How to Install Appium?
Enter the Command Prompt of Windows and enter the below command to install Appium.
npm install -g appium
Appium directory settings need to finish in Katalon Studio:
-
Firstly, open Katalon Studio.
-
After that, Menu >> Windows >> Katalon Studio Preferences >> Katalon >> Mobile settings. Here, set the Appium Directory folder. Consequently, it will look something like below:
Additionally, by default, it's usually installed at C:\Users{your login account}\AppData\Roaming\npm\node_modules\appium.
How to Enable developer mode on Android device?
USB Driver for Android device using for testing
- First, turn on the phone's developer mode (go to Settings > Developer options).
- Second, connect your Android phone to your computer via a USB cable.
- Third, confirm if prompted to accept/trust the device.
- After that, in the Developer Options on your mobile user interface, enable:
- USB debugging – It is the debug mode when we plug in the USB.
- Install via USB – It allows the installation of the apps via USB.
- USB debugging (Security Setting) – Allow granting permissions and simulating input via USB debugging
- Fourthly, install Android SDK: Katalon Studio will detect and ask you to install the Android SDK automatically if your current machine doesn't have it. Moreover, please allow Katalon Studio to install it in this case. This will help in automation.
How to Install Test Execution?
- Firstly, open Katalon Studio Execute a test suite using an Android device:
- Secondly, select your device from the Android Devices list. After that, click OK.
- Thirdly, if your test suite runs successfully, you will see the results in the test reports as follow:
- Fourthly, click on Spy Mobile. Consequently, a new window will open where the user can capture objects.
- Fifthly, the Spy Mobile Utility dialog is displayed. After that, specify the settings of your mobile testing in the Configurations section.
where:
Filter | Description |
---|---|
Device | It is the smartphone to capture objects. Additionally, all the connected devices should be displayed in this list. |
Application Type | Currently, Katalon Studio only supports native mobile applications. |
Application File | It is the absolute path to your mobile application file (.apk file for Android or .ipa file for iOS ). |
- Sxithly, click the Mobile Object Spy – the window will open. You can set configuration such as specifying the device for testing and the APK app to be tested. After that, click on Start when you complete the settings.
- Seventhly, the Device View dialog is displayed to show the current screenshot of your real device. All the mobile objects from that screenshot are analyzed and organized in a hierarchical view, which can be found at the All Objects section of the Spy Mobile Utility dialog. Subsequently, click on any object from the hierarchical view, and it is highlighted in Device View accordingly.
- After that, select any objects from the hierarchical view and click Add to Object Repository to save them to Katalon Studio.
- The Folder Browser dialog is prompted to decide where to save the captured objects. After that, select your preferred location then click OK.
- Finally, this is how your captured objects will appear in Object Repository accordingly
- You can continue with the current mobile screen or navigate to other interfaces as needed. Moreover, to reload the Device View and the details in Spy Mobile Utility, click on the Capture Object button.
- Lastly, close the Spy Mobile Utility dialog when you're done with capturing objects.
Therefore, the steps above create and run a simple test. Moreover, for advanced features such as branching, looping, or validation, you can refer to the following articles:
Congratulations! Thats all about simple Mobile Automation Testing with Katalon Studio. Conclusively, now you can write my scripts manually using mobile. Moreover, you can carry out mobile automation easily using Katalon Studio.