Environment Setup

Install Git

The BitBar GitHub repository contains a number of samples that can help you get started with running Appium tests either remotely or as server-side tests in BitBar Testing Cloud.

To get started with the samples, the user should have Git installed and the programming language of choice. Below is the guide with the steps to install Git in different environments, followed by guides on getting different programming languages set up.

Mac OS X

Download the latest version of the Git command-line tool from https://git-scm.com/download/mac and install it using the normal Mac installation procedure.


Use the following command to get Git installed on your Linux machine:

$ sudo apt-get install git


The easiest and the most straightforward way is to install the Github Desktop application for Windows.

Python Setup

Python on Mac OS X and Linux

BitBar Appium Python samples use Python version 2.7.x and will not work with Python 3. To learn what version is currently installed, run the below command:

$ python --version</pre>

If Python is not installed, it can be installed by using the following commands:

# on Linux
$ sudo apt-get install python2.7

# on Mac OS X
$ brew install python

Brew is a handy package manager tool similar to apt-get. More information is available on the Brew website for its one-liner installation.

For easier Python package management, pip should also be installed. Use the following command:

$ pip --version

If pip is appropriately installed, it should print something like this:

pip 1.5.6 from /Library/Python/2.7/site-packages (Python 2.7)

If not, pip can be installed as follows:

# on Linux
$ sudo apt-get install python-pip
# on Mac
$ sudo easy_install pip

With pip installed, let’s install the Selenium module needed by Appium tests.

$ pip install selenium

And finally, verify that Selenium got installed:

$ pip list | grep selenium

Python on Windows

Ensure the latest Python version 2 (2.7.x or newer) is installed. Go to the command line and use the following:

> python --version

If Python 2.7 is not installed, download and run the setup from Python Download Center. To add Python into environment variables:

  1. Go to Windows Control Panel > System and Security > System > Advanced system settings > Environment Variables.

  2. In the System variables section, select Path and click Edit.

  3. Click New and insert C:\Python27.

  4. Click New again and insert C:\Python27\Scripts.


    We assume that you have installed Python to the default location, otherwise, provide your Python installation paths.

  5. Re-launch the command prompt to bring the new environment variable into effect.

Then, check whether Python’s pip module is already installed:

> pip --version

Install pip, if you have not already done so. We assume here that you have cURL installed. If not, check out the cURL Instruction and Installation.

curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py > get-pip.py
python get-pip.py
del get-pip.py

Now that Python and pip are available, let’s install Python’s Selenium module:

$ pip install selenium

Java Setup

Appium testing supports writing tests in multiple programming languages, including Java. The Java installation guide helps get Java working on the environment of choice.

With Java, things are simple and only the test configuration file needs to be updated accordingly. Use the BitBarConfiguration for Java filepom.xml as an example or template.

If no IDE is used, Maven can be used to launch the example from the command line. Make sure Maven is properly installed. Here’s the link to Maven installation instructions.

C# Setup

C# on Windows

Launch the AppiumTest.sln file on Visual Studio and make sure that NUnit Test Adapter is installed through the Extension Manager. Use Test Explorer to run your tests.

C# on Windows and Mac OS X

First, install Monodevelop for C# support. Then, download dependencies using Nuget:

$ nuget install Test123/packages.config -OutputDirectory packages

To build the package on Mac OS, simply use the following command over the correct path:

$ xbuild

Ruby Setup

First, install the latest stable release of Ruby:

$ curl -sSL https://get.rvm.io | bash -s stable
$ rvm install ruby

Let’s make sure RVM is using the correct Ruby version by default:

$ rvm list
$ rvm --default use 2.1.1

If you have an old Ruby/RVM version, it can be upgraded with the following commands:

$ rvm get head
$ rvm autolibs homebrew
$ rvm install ruby

Check that it’s installed properly by printing out the Ruby version:

$ ruby --version

Update RubyGems and Bundler:

$ gem update --system
$ gem install --no-rdoc --no-ri bundler
$ gem update
$ gem cleanup

Check that RubyGems is >= 2.1.5

$ gem --version

Run bundler at the Ruby client-side and server-side examples to install dependencies:

$ bundle install

See Also

Publication date: