Skip to content

yinhongyan/appium-setup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

appium-setup

appium_env.sh is a Mac environment setup script that installs software needed to develop Appium acceptance tests in the language of your choice.

Prerequisites

  • Xcode, along with Command Line Tools

If you want to develop Android tests, you also need:

  • Android SDK
  • Make sure JAVA_HOME is set (add export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" to your .bash_profile)
  • Make sure ANDROID_HOME is set (add export ANDROID_HOME="/path/to/android/sdk" to your .bash_profile)
  • Add /path/to/android/sdk, /path/to/android/sdk/tools, and /path/to/android/sdk/platform-tools to your /etc/paths file (might have to do this with sudo)
  • Create an AVD (look into speeding up the Emulator using Intel HAXM for x86 AVDs, and x86 AVDs with Google APIs) or use a real Android device to run tests on

Execute the script

To execute the script, you must chmod a+x *.sh first.

Example usage:

./appium_env.sh [options]

Running the script with no options installs Appium software only (no language-specific software).

Options:

-h, --help   Prints usage.
-a, --all    Installs all software for all languages.
-f, --force  Ignores certains warnings to force continuation.
--no-source  Does not clone the appium source code.
--haskell    Installs Haskell software.
--ruby       Installs Ruby software.
--java       Installs Java software.
--obj-c      Installs Objective-C software.
--perl       Installs Perl software.
--php        Installs PHP software.
--python     Installs Python software.

What it installs

Appium

Haskell --haskell

Ruby --ruby

Java --java

Objective-C --obj-c

Perl --perl

PHP --php

Python --python

* Substitute this with the test framework of your choice.
** These are gems used to access APIs for certain tests, so they are optional.

After the script runs

  • Install Appium.app if you would like and have not done so already. It has a nice Inspector functionality that allows you to record actions and view elements.
  • Run git pull and then ./reset.sh --dev on ~/Documents/appium.
  • Go through the Appium User Quickstart below (downloads a sample iOS calculator app and runs tests).
mkdir appium-test && cd appium-test
sudo authorize_ios  # enable developer use of iOS sim
npm install wd
curl -O https://raw.github.com/appium/appium/master/sample-code/examples/node/simplest.js
appium &
node simplest.js

About

Mac environment setup script for Appium.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published