appium_env.sh is a Mac environment setup script that installs software needed to develop Appium acceptance tests in the language of your choice.
- Xcode, along with Command Line Tools
If you want to develop Android tests, you also need:
- Android SDK
- Make sure
JAVA_HOME
is set (addexport JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
to your.bash_profile
) - Make sure
ANDROID_HOME
is set (addexport 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
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.
Appium
- Homebrew
- Node.js
- npm
- grunt
- mocha
- Maven
- Appium command line (from npm)
- Clones the appium Github repo to ~/Documents/appium, if you want to run Appium from source (unless you specify
--no-source
)
Haskell --haskell
Ruby --ruby
- Ruby 2.0+
- RVM
- selenium-webdriver gem
- appium_lib gem
- rspec gem*
- CI::Reporter gem*
- JSON gem**
- httparty gem**
Java --java
- Nothing. Download the jar from Selenium HQ
Objective-C --obj-c
Perl --perl
- Nothing. Install the module by following the instructions from Selenium-Remote-Driver
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.
- 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