In case you’re interested to start testing your Android & iOS apps and games with Appium, here are the basic steps to get you up and running with it on real devices at Bitbar Testing. Just follow these steps, with provided sample and test scripts, and you’ll see how easy it actually is.

Windows

Ensure that Python 2.7.x or later is installed

$ python --version

If not installed, download and run setup from python.org download center
To add Python environment variables, go to System Properties > Advanced System Settings > Environment Variables > System Variables > Edit ‘Path’, and insert “C:Python27;C:Python27Scripts” in the end (Assuming you have installed Python at default location). Make sure to restart the command prompt for new environment variables to come in effect.

Running the TestScript

Download our Appium Sample TestScripts and sample applications archive, which includes sample iOS and Android apps the tests are written for. Navigate to the downloaded scripts directory via command line. There are three sample TestScripts:

Step 1: Set credentials and other parameters

Open the TestScript testdroid_ios.py in any text editor. Set the screenshotDir to path where you want the screenshots to be saved in at your machine. Set your credentials against testdroid_username and testdroid_password in Desired Capabilities. Set the myAppFile identifier from Step 0 against testdroid_app in Desired Capability. Details on all testdroid_ Desired Capabilities can be found here, but you can use default values for now.

Step 2: Run the TestScript

$ python testdroid_ios.py

The output should look like:

Step 3 (optional): Upload your Test Suite output to Cloud

If your test suite generates a JUnit XML results file, you can upload the XML to Cloud. Doing this will show the test-cases and their statuses on the Web UI, and let you download test reports.

> Add the testdroid_junitWaitTime Desired Capability in your TestScript.
> Get Appium sessionId from your script (after the WebDriver connection has been established) using: driver.session_id()
> After your test run has finished, and JUnit XML has been generated, use Curl to upload the XML to Cloud:

Step 4: Get results from Bitbar Testing

The screenshots are available locally on your machine inside the directory you specified in Step 1.
Log into https://cloud.bitbar.com and navigate to project name as defined in testdroid_project Desired Capability to get the following log files.