Java Server Side Example

When using server-side Appium execution, standard Appium tests can be run on hundreds of devices in parallel without any need for complex set-ups at the client side.

The examples presented here below are valid for both Android and iOS devices. Server side Appium test runs are available for all plans on Bitbar Testing cloud.

How Server Side Appium Works

Bitbar Testing supports running Appium as either client side or server side. In a client side execution the Appium tests are executed on localhost against one device in Bitbar cloud. On a server side approach the tests and the app are uploaded to Bitbar cloud where they are used to run tests against multiple devices at a time.

Sample Test

A sample for server side Java tests can be found from Bitbar’s public Github repository at

To start, make a clone of the above mentioned Bitbar samples repository. The readme file is a good starting point.

The repository contains all necessary scripts for server side execution.

  • - Script to package tests into a zip file that is uploaded to Bitbar for server side testing
  • - This script unzips the above created zip-file and starts test execution.

Let’s start by creating the server side test zip-file that is next uploaded to Bitbar Testing cloud service. This zip-file needs to have the, pom.xml and the test directory src in its root. Using the let’s create the zip package.

 $ ./
 updating: pom.xml (deflated 74%)
 updating: (deflated 60%)
 updating: src/ (stored 0%)
 updating: src/test/ (stored 0%)
 updating: src/test/java/ (stored 0%)
 updating: src/test/java/com/ (stored 0%)
 updating: src/test/java/com/testdroid/ (stored 0%)
 updating: src/test/java/com/testdroid/appium/ (stored 0%)
 updating: src/test/java/com/testdroid/appium/android/ (stored 0%)
 updating: src/test/java/com/testdroid/appium/android/sample/ (stored 0%)
 updating: src/test/java/com/testdroid/appium/android/sample/ (deflated 58%)
 updating: src/test/java/com/testdroid/appium/ (deflated 54%)
 updating: src/test/java/com/testdroid/appium/ (deflated 52%)
 updating: src/test/java/com/testdroid/appium/ (deflated 75%)
 updating: src/test/java/com/testdroid/appium/ (deflated 71%)
 updating: src/test/java/com/testdroid/appium/ios/ (stored 0%)
 updating: src/test/java/com/testdroid/appium/ios/sample/ (stored 0%)
 updating: src/test/java/com/testdroid/appium/ios/sample/ (deflated 58%)
 updating: src/test/resources/ (stored 0%)
 updating: src/test/resources/ (deflated 36%)
 updating: src/test/resources/ (deflated 19%)
 updating: src/test/resources/ (deflated 42%)
 updating: src/test/resources/ (deflated 13%)

The above creates a file to current directory. This is uploaded to public cloud in the next steps.

The required sample app is located at testdroid-samples/apps/builds/. Both Android apk and iOS ipa samples are available.

Next on Bitbar Testing the environment needs to be created to start the test run.

  • Create an Appium Server side project (either iOS or Android) if one does not already exist

  • Create new testrun for this project
  • Upload application to test (BitbarSampleApp.apk/BitbarIOSSample.ipa) in the “Application” step
  • Upload the test zip on the “Upload test file” step
  • Choose the device group to use or create a new group for this test run
  • Start testrun