Automated test for iOS with appium: set up the environment

Performing manual testing require a long time, and also limit us in the performance of certain test cases. Let’s start to  automate UI test cases!

For creating automated test for iOS we are going to use  Appium  that is an open source, cross-platform test automation tool for native, hybrid and mobile web apps, tested on simulators and real devices.

Appium allow us to use the language we want, we are going to use Python  .

Follow the next steps to set up all you need to start making your own iOS automated tests on your Mac.

Appium requirements:
  • Mac OS X 10.7 or greater.
  • XCode >= 6.0, 7.1.1 recommended
  • Apple Developer Tools (iPhone simulator SDK, command line tools)
We need to install:

Installs easily with  Homebrew  :

Homebrew doesn’t require access to administrator-only areas of your computer in order to install any package. You can install tons of great stuff quickly and efficiently with it.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

We need to install node without sudo  to run appium.

  1. Check if you have node already installed:

npm --version

If you do not have it installed, skip to step 4.

 

  2. If you have already installed try start appium with

appium &

If you receive some error like the next one means that you have installed with sudo, take the following steps, if not just skip to step 4.

error: Appium will not work if used or installed with sudo.

 

  3. Remove node installed with sudo with following steps:

sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf ~/.npm
brew uninstall node

 

 4. Install node without sudo with the following steps:

brew install node --without-npm

Set a local node prefix

echo prefix=~/.node >> ~/.npmrc

install npm

curl -L https://www.npmjs.com/install.sh | sh

And adjust $PATH to point to the new installation destination for global node executables

export PATH="$HOME/.node/bin:$PATH"

 

  5. Install appium

npm install -g appium

It is required java JDK.

 

 6. Install python

brew install python

 

  7. Install pip and packages

sudo easy_install pip
pip install nose
pip install Appium-Python-Client
pip install requests
pip install selenium

 

  8. Install ipdb for debug

pip install ipdb

 

Now you are ready to start creating your own automated test!

On next posts we will take a look to the Appium UI, start creating your first automated test, launch a single or several tests with nose and much more. Stay tuned!

 

Leave a Comment

Responsable » Solidgear.
Finalidad » Gestionar los comentarios.
Legitimación » Tu consentimiento.
Destinatarios » Los datos que me facilitas estarán ubicados en los servidores SolidgearGroup dentro de la UE.
Derechos » Podrás ejercer tus derechos, entre otros, a acceder, rectificar, limitar y suprimir tus datos.

¿Necesitas una estimación?

Calcula ahora