Manual for Testing Mobile Apps with Katalon Studio:
Without specialist tools or direction, scripting your initial mobile automation test case may be complex.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
We will illustrate in this tutorial how to expedite your automation project by leveraging the mobile recording feature of Katalon Studio and executing your recorded test cases on Kobiton’s cloud-based device farm.
Assuming you have already installed Katalon Studio, acquainted yourself with its fundamental operations, and created a Kobiton account, let’s proceed with the tutorial.
What You Will Learn:
Building Mobile Automation Test Cases Using Katalon Studio’s Recording Feature
Before we start, ensure you have:
- Downloaded the target app for testing, Material Login Demo. This app offers a set of basic authentication features that we will automate.
- Set up your Katalon Studio for mobile testing.
Katalon Studio provides two features to streamline the automation process:
- Mobile Object Spy, which quickly fills the project’s object repository.
- Mobile Recorder, which creates automation scripts from recorded actions.
As this tutorial mainly concentrates on the Recorder utility’s functionality, please refer to the Katalon Studio Documentation for guidance on utilizing the Object Spy feature, if required.
#1) Firstly, open the sample project included in Katalon Studio and generate a new test case. Click the Mobile Recorder button to initiate the recording dialog shown below.
(NOTE: Click on the image to enlarge)
#2) With the dialog open, follow these instructions to setup your recording session:
- Connect your device or initiate your emulator, then select it from the Device Name drop-down menu.
- Click Browse to pick the app file from your computer (.apk for Android, .ipa for iOS apps).
- Click Start and wait for the app to initiate on your device.
When the setup is complete, the app will appear as illustrated in the screenshot above.
(Note: The app’s initiation is recorded as the first action in the script)
#3) Once your app is ready on your mobile device, commence recording the test case.
i) Tap on “No account yet? Create one” to navigate to the Create Account screen.
Select the android.widget.TextView0 object in the object tree. (Alternatively, you can tap the text on the Device view to target the object).
Then click the Tap object to record the action. This action mimics a tap on the app.
You will be redirected to the Create Account screen.
ii) Provide the information to build an account.
Select android.widget.EditText0 (or tap on the Name text box on the Device view to fill in a name).
Then click Set Text to execute the set text action on the Name text.
Enter “name” for the text input as presented below. Click OK.
The text is set in the device, and the action is recorded in the Recorded actions table.
iii) Repeat the same procedure for the Address field, entering “address” as the value for this field.
iv) To enter a value for the Email field, we need to hide the on-screen keyboard to reveal the field. Press the Hide Keyboard action button. Select the Email field to perform the set text action using “[email protected]”.
v) Implement the same steps for the Mobile Number, Password, and Re-enter Password text fields.
vi) Finally, click on Tap to tap on the Create Account button. You will be returned to the primary screen.
vii) Click Stop on the Mobile Recorder dialog to halt the recording session.
The captured actions should resemble this:
viii) Click OK to finalize the recording and choose a location to save your captured objects. Click OK again for Katalon Studio to generate test scripts.
#4) View your test case in Manual mode or replay it to validate all recorded actions. Now, let’s incorporate validation points to verify whether the recorded inputs successfully set the text fields.
- Select the first Set Text step. From the Add toolbar or context menu, add a Mobile Keyword step and choose the keyword Verify Element Attribute.
- Select the test object representing the Name text field, which is a widget.EditText0, as the object to verify.
- Double-click the input cell for the test step and set the following values to authenticate the step of setting the text to Name.
- Repeat the same steps for all other Set Text actions.
After incorporating the validation test steps, run the test case again. This time, the execution will take longer for Katalon Studio to execute the validation steps, but your test case should pass successfully since the input value matches the validation value. You can test with distinct values or connect to a data source.
Executing Your Mobile Automation Test Case with Kobiton’s Cloud Devices
#1) Upload the Material Login Demo app to Kobiton’s App Repository. In the Repository view, select the more actions button and choose Automation snippet. Copy the app ID (shown in bold, for example, Kobiton-store:184′) and keep it.
#2) Visit the Kobiton Devices page and pick the devices on which you want to execute your tests. Star those devices by clicking on the star icon.
#3) Let’s enable Kobiton integration.
- Open Katalon Studio Preferences (Windows -> Katalon Studio Preferences) and select Kobiton.
- Enter your Kobiton username and password. Click Connect to test the connection and authentication. Katalon Studio will automatically fetch the API keys from Kobiton with a valid account.
- Click Apply or OK to retain the settings.
#4) Open the test case created previously and replace the application path in the initial step “Start Application” with the Kobiton app ID saved in Step 1.
#5) A new menu option will emerge under the Execution toolbar as demonstrated below. Click on Kobiton Device to activate the Kobiton Favorite Device dialog.
#6) Select your preferred device for execution from the Favorite Device list. Click OK to initiate the execution with that device. It may take some time to establish the connection to Kobiton before the execution starts. Once the test execution is done, you will be able to view the results by logging into Kobiton sessions.
Conclusion
The combination of Katalon Studio and Kobiton permits automation engineers to confirm the quality of mobile apps by executing recorded test cases on numerous devices expeditiously. This solution not only conserves time but also boosts test coverage.
=> Suggested further reading: Katalon Studio Tutorial
Katalon Studio is a FREE comprehensive automation solution that is available for download from their website. Kobiton is a cloud-based mobile device farm that offers real devices for both manual and automation testing at an affordable cost.
About the Author: This is a guest post by Hieu Mai. Hieu Mai is a senior full-stack developer at KMS Technology presently. He is one of the developers behind Katalon Studio and has five years of expertise in desktop and mobile application development and automation testing.
In our subsequent article, we will debate How to Secure a Mobile Testing Job Rapidly.