Simple Automation Testing using Kobiton:
In this tutorial, we will cover simple automation with the Kobiton tool and, we will also see how to run parallel tests with Kobiton.
Step by Step instruction of each step involved in the automation and execution process is explained in simple terms along with the concerned pictorial representation for your easy understanding.
What You Will Learn:
Introduction to Kobiton Tool
Before proceeding with the steps involved, let us know about the Kobiton tool.
Testing on new mobile devices is really crucial to ensure that your app works well on different device configurations and screen resolutions. With Kobiton, you can continuously test your app on a variety of mobile devices ranging from older models to the latest releases.
Instead of using emulators or simulators, which tend to stop the reproducing of real user conditions, Kobiton allows you to execute automation tests on real mobile devices. It produces a test report for the device tests, and the test report is comprised of detailed logs, HTTP commands, and metadata.
Simple Automation with Kobiton
Step #1: Login to your Kobiton account or you can create one free here.
And You will see the below screen:
Step #2: Select the device over which you want to perform automation testing. Click on show automation settings icon that is found in the bottom right corner of the device box.
And his will open the automation settings window.
Step #3: Choose the programming language inline with your test script. As Kobiton supports the Appium test automation framework, I have selected NodeJS in the below screen.
Once you select NodeJS, you will get a screen as shown below:
Step #4: Copy the configuration for the selected device using the ‘Copy to Clipboard’ button.
Step #5: In your NodeJS test script – Under the input capability section, replace the current configuration with the Kobiton device configuration using the copy paste command.
Replaced with the device Configuration:
Step #6: Change the parameters according to your test script.
Here, it is ‘serverConfig’. So, replace ‘webdriverKobitonServerConfig’ with ‘serverConfig’.
And the screen will look as shown below:
Step #7: Using the terminal on Mac OS, input the command to initiate your automation test.
Step #8: To check the status of your automation test, return to the Kobiton portal home page and click the sessions tab.
Step #9: While clicking on the sessions tab, you will be able to verify that your test is currently running.
Step #10: As Kobiton does not currently support live view during the automation test, you may consider using any third-party app to watch the live execution.
On the last step of the live execution, your screen will as shown below:
Step #11: After the test is finished running, check the session details for more information such as commands and their respective screenshots.
Clicking on each command will give you its respective screenshot.
And this is how automation testing is done with Kobiton.
Now, let us see how to run parallel tests using Kobiton.
Parallel Testing with Kobiton
One of the great features of Kobiton cloud service is that it supports parallel testing where you can execute concurrent tests. This ultimately saves your time during test cycles.
Let us see how to execute parallel tests.
Step #1: This is a prerequisite step. You should already have node.js installed on your machine. This can be done through the below link.
Install node.js from here.
Step #2: Prepare the test scenario and the test scripts.
In this case, I am using a sample script available in the Kobiton’s sample repository on git.
So, I will first go to the desired directory and then I will clone the git repository to that current directory on my local machine.
The commands are highlighted in yellow in the below screenshot.
This is a simple script that opens up Google in the Chrome browser on the android device, and then enters ‘Kobiton’ in the search box and clicks on the search button, and finally verifies if the title contains the keyword ‘Kobiton’.
Keep this file open with you. You will have to customize this according to the multiple devices that you are selecting to test in parallel.
Step #4: Go to your Kobiton account and collect the username and API Key.
The username will be found in the profile section.
The API key will also be found in the Settings section. Copy this key and paste it somewhere in your notes.
Step #5: Copy paste the above-retrieved username and the API key in the multiple-devices-test.js file.
Step #6: Choose both the devices from your Kobiton account. I have selected Galaxy A7 and Galaxy On Nxt here.
Open the Automation settings for each device, select NodeJS as language and copy the values from the desiredCaps part of the script as highlighted in blue in the below screenshots for both devices.
Step #7: Replace the existing values in the multiple-devices-test.js file with the above-copied values.
Save the above .js file. And, now you are ready to execute parallel tests.
Step #8: Go to the command prompt and execute parallel tests by giving the npm run command.
You can see in the above screenshot that 2 parallel tests were executed and passed successfully.
Step #9: Verify the tests in your Kobiton account.
Go to ‘Sessions’ in your Kobiton Portal to see if both the test sessions were completed with nearly identical timestamps, which means that they were run in parallel to each other.
You can click on each session to see further details regarding what happened in each test. The current version of Kobiton provides a great level of detail for each automation session, such as Session Overview, HTTP Commands, Video, and Logs.
As an Example, I’ve added the video of one of the above sessions.
Through this tutorial, we learned how to do simple automation on Kobiton and then we also came to know how to execute parallel tests.
I would say that Kobiton is a great platform for mobile testing. Kobiton empowers mobile automation testing and the UI of Kobiton is very simple and easy, and this, in turn, makes your testing awesome.
Have you used this excellent tool? Or Are you a new user who is eager to give a try to Kobiton tool? Feel free to express your thoughts in the comments section below.
Last Updated: August 21, 2019 5:26 am