Appium Test Execution on a Remote Device

Reading Time : 7 min read
Remote device being accessed securely from a laptop in real time

When it comes to testing on real devices, it is imperative to introduce remote device testing execution into your quality process to ensure the behavior is as expected for your end-users. The mobile ecosystem is particularly fragmented, given the wide range of device manufacturers and different versions of operating systems. The only way of knowing that it really works on real-devices is to test your app on a wide variety of devices.

The question then becomes “how”? After all, it would seem that working with simulators/emulators is much simpler than buying physical devices, which are constantly being released.

Making Remote Device Testing a Breeze

A Cloud Device Provider provides a set of real devices on the cloud at scale. The main purpose of any cloud device provider is to provide the testing infrastructure upon which the test cases will be executed on, so the team is can be focused on producing the test scripts.

The main advantage to use a cloud device service is that you will always have access to the latest (and older) set of devices.

Another advantage is that users can see the test execution details such as screenshots, execution logs, failure log details and even video. And if you have a geographically dispersed team, everybody has access to the devices and the session logs.

Popular cloud device providers include Kobiton, Perfecto, Browserstack and SauceLabs. In this article, we will look at using Kobiton.

Kobiton

Kobiton focuses exclusively on real devices rather than emulators and simulators. Kobiton uses its own Appium Server, so you don’t need to worry about starting your own Appium server – you focus on the test scripts!

Kobiton provides:

  1. Rich test logs for true Root Cause Analysis:
    • Kobiton provides various analysis and reporting features such as:
      • Full video recording.
      • Screenshots.
      • Capture user interactions.
      • System metrics reporting.
      • Full device logs.
      • Script execution results.
  2. Integration with your favorite tools:
    • You can also integrate it with various tools such as:
      • JIRA
      • Github
      • HockeyApp
      • Jenkins
      • Travis CI
      • TeamCity
  3. Powerful APIs:
    • Kobiton provides the full support of Appium with major programming languages such as Java, Python, C#, Node.js, Ruby and PHP and they have also did partnership with Katalon Studio(A highly acclaimed and innovative test automation tool).
  4. Manual, Automated and Parallel testing supported:
    • It provides support for parallel execution which is necessary for CI/CD process and also supports:
      • On-demand manual testing.
      • Automation testing.
      • Supports Appium and Selenium.
      • Mobile web and cross browser testing.
      • UI testing.
      • Supports parallel script execution.
      • Full DevOps integration.

Kobiton Website: https://kobiton.com/real-device-testing/

Now let’s see how easy it is to test your Appium script on real-devices in the cloud.

  1. Visit https://kobiton.com/ and register as a new user.
Kobiton registration page showing the account sign-up form with fields for user details, company information, and account creation options.
Figure-1: Kobiton Registration Page.

  1. After the successful registration you will get an email for the confirmation from the Kobiton so you can confirm it.
Kobiton email verification message prompting a new user to confirm their email address, featuring a Verify Email button and support contact information.
Figure-2: Kobiton Confirmation Email.

  1. Now you can access the Kobiton portal by providing valid credentials.
Kobiton login page showing a successful email verification message. The screen includes username and password fields, a “Remember me” option, and a Login button.
Figure-3: Kobiton Login Page.

  1. As part of the free trial, you get 120 minutes. By completing the survey you can get an additional 30 minutes of testing.
Figure-4: Select the preferences.

  1. Once you click on Claim your 30 minutes! Button you will be redirected to the dashboard where you can see the devices.
Kobiton dashboard interface displaying connected mobile devices, testing sessions, device availability, and management tools for executing and monitoring mobile app tests on real devices.
Figure-5: Kobiton Dashboard.NOTE: Please make sure the device upon which you want to start execution is Online (Available for execution) otherwise you can get the exception saying: org.openqa.selenium.SessionNotCreatedException: No device matching the desired capabilities

Kobiton cloud device dashboard displaying mobile device availability statuses, including online, busy, and offline indicators for Android test devices.
Figure-6: Device Availability.

  1. Now on the dashboard page you can choose any device for test execution. But before you choose the device for execution you need to upload the mobile application which you want to automate by going into the Apps section.

Figure-7: Add a new app
Screenshot showing a file selection dialog used to upload a mobile application package. The window displays application files available on the local computer, allowing the user to browse and select an APK, IPA, or ZIP file for upload. This step is part of the process of adding an application to Kobiton’s Apps Repository for testing on real mobile devices.
Figure-8: Select the application from finder window.
Kobiton Apps page showing an APK file named DemoApp.apk being uploaded. The screen includes an option to add new app packages (.apk, .ipa, .zip) and a progress bar indicating the upload is in progress.
Figure-9: Uploading the new apk file.
Application upload screen showing a successful upload of an Android APK file, with a confirmation message indicating the app is being processed and will be available after the page is refreshed.
Figure-10: apk file uploaded.

  1. Once the application is uploaded successfully you can get the app id for the uploaded application because you need to pass this id as value of app key in Desired Capabilities.

capabilities.setCapability(“app”, “kobiton-store:22304”); Or you can also select the application in the automation settings dialog, so that you don’t need to manually write the app value in desired capabilities.

Kobiton Apps Repository interface showing an Android app entry with options to upload a new app version and access automation snippet settings.
Figure-11: Get Automation snippet.

Screenshot of the Kobiton Apps Repository showing an Android application named “TheApp.” A pop-up dialog explains how to use the application in an automated test session by setting the Appium app capability to kobiton-store:v23560. The screen demonstrates how Kobiton provides a unique app identifier for launching uploaded applications during automated mobile testing.
Figure-12: app capability value.

  1. After noting down the app value you can move to the Devices section and in the automation settings you will get the set of the Desired Capabilities (for every programming language) which you need to use in order to execute the test case on Kobiton device.
Figure-13: Show automation settings for Device.

Screenshot of Kobiton automation settings for a mobile device, showing configuration options for test execution, device selection, automation preferences, and test environment setup.
Figure-14: Automation Settings for Device.

As we want to execute test cases for a mobile application, you need to select the ”Hybrid/Native from Apps” option.

Kobiton automation settings screen for a Nexus 5X device showing Hybrid/Native app testing configuration and Appium capabilities setup.
Figure-15: Choose HybridNative from Apps.

Now as we have already uploaded the application to Kobiton server, so you just have to click on “Select App from Apps Repo” button and select the uploaded app.

Kobiton automation settings panel showing the "Select App from Apps Repo" button highlighted for choosing a mobile app from the application repository.
Figure-16: Click on Select App from Apps Repo button.

As we want to execute test cases for a mobile application, you need to select the ”Hybrid/Native from Apps” option.

Figure-17: Select uploaded app. And at last, copy the set of Desired Capabilities.

Screenshot of Kobiton's Automation Settings for Nexus 5X window. The interface shows Android 8.1.0 device configuration options, including app selection from the Apps Repository and screenshot capture settings. On the right, a generated Appium code snippet displays the desired capabilities required to connect to the device, with the app capability highlighted and a copy button available for copying the configuration code.
Figure-18: Copy Desired Capabilities.

  1. Now we need to paste the desired capabilities to our test script and run it. And here, we are using the same android script.
Screenshot showing a test automation script editor with desired capabilities configuration pasted into the code, demonstrating setup for mobile test execution in Kobiton.
Figure-19: Paste Desired Capabilities in Test Script.

  1. Now when you run the script, you can see the session is created for the selected Kobiton device.
Kobiton sessions dashboard displaying automation test activity, session statistics, device usage, and a running Android test session on a Nexus 5X device.
Figure-20: Kobiton Session is created.

  1. Once execution is finished, you are able to analyze the logs, screenshots, video and even HTTP commands.
Kobiton session overview page displaying details of an automated mobile test run, including device information, test duration, installed app details, automation settings, and execution status.
Figure-21: Session Overview.

Diagram illustrating HTTP commands used in mobile test automation. The image shows the interaction between a test automation client and a mobile application through HTTP requests and responses, demonstrating how commands are sent to a device or emulator and how results are returned. The visual represents the communication layer that enables Appium-based automation frameworks to control and validate mobile app behavior during testing.
Figure-22: HTTP Commands.

Kobiton session details page displaying a recorded test execution video of a mobile application, with playback controls and session navigation options.
Figure-23: Execution Video.

Kobiton session logs page displaying detailed device and Appium execution logs generated during an automated mobile testing session, including system events, test actions, and diagnostic information.
Figure-24: Execution Logs.It’s that easy!You can find the above test code here: https://github.com/appiumbook/appiumbook/tree/master/Chapter10-Test%20Execution%20on%20Remote%20Device-Kobiton

  • There is one more thing! What if you want to execute test cases for a mobile browser(chrome/safari) instead of a mobile application? The answer is pretty simple – you just need to select the ”Web” option in the Automation settings for the device and simply copy the desired capabilities. And because we’re testing a web application in this case, there is no need to upload an app.
Automation Settings for Mobile Browser execution
Figure-25: Automation Settings for Mobile Browser execution.

  • Moreover, if you want to manually test your mobile application on a Kobiton device you can easily do that, you just need to select the device click on the Launch button.

Kobiton device selection screen showing an iPhone 7 Plus with a Launch device button and controls for viewing device details and settings.
Figure-26: Launch device.

  • In this manual mode you can control the real device the same as if you had the device in-hand.
Manual mobile app testing session running on a real device in Kobiton, showing a tester interacting with an application to validate functionality and user experience.
Figure-27: Manual testing on device.

Kobiton offers many features, including the ability to combine your own on-premises devices with the cloud devices. A detailed review of all the Kobiton capabilities are beyond the scope of this article, but if you visit our docs, you can find additional information and services offered by Kobiton.

For more information about Automation testing with Kobiton, visit here. And for Manual testing with Kobiton, you can find documentation here. Real-device testing should be a key part of your quality process. Fortunately, this is made easy by cloud device providers.

Appium eBook

Interested in Learning More?

Subscribe today to stay informed and get regular updates from Kobiton

Ready to accelerate delivery of
your mobile apps?

Request a Demo