├── LICENSE-MIT ├── README.md ├── android.sh └── ios.sh /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Christian Bromann 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | 'Software'), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Appium setup made easy 2 | 3 | Hassle free Appium setup on OSX using shell script. 4 | Appium is an open source, cross-platform test automation tool for native, hybrid and mobile web apps, tested on simulators (iOS, FirefoxOS), emulators (Android), and real devices (iOS, Android, Windows, FirefoxOS). These shell script (.sh) file will help you set up Appium on OSX. 5 | 6 | ## REQUIREMENTS 7 | 8 | Your environment needs to be setup for the particular mobile platforms that you want to run tests on. 9 | 10 | 1. You will need node.js and npm v6 or greater. Install Node.JS from the site - https://nodejs.org/en/ take the LTS version based on your Operating system. Please make sure you install NodeJS globally. Recommended version is 6.10.0. OR If you have nvm installed globally, you run `nvm install` to get the latest version of node specified in the`.nvmrc` file [here](/.nvmrc). If you don't use nvm, be sure that you are using a compatible version. Further details on nvm can be found on the official [github page](https://github.com/creationix/nvm). MAC OSX users are best suited to install nvm with homebrew `brew install nvm`. 11 | 12 | 2. JDK 1.8 or above (require for Android). Set 'JAVA_HOME’ to be your JDK path. The bin in that directory should be added to your PATH variable. 13 | 3. XCode 8 and up recommended (require only for ios). XCode can be download and installed from the Apple's `App Store`. 14 | 15 | ## INSTALLATION 16 | 17 | open a terminal, navigate to appium-setup-OSX directory 18 | 19 | #### iOS setup 20 | 21 | sh ./ios.sh followed-by-your_system_password 22 | 23 | ##### provide your system password as you need to authorize use of the iOS Simulator etc. more info can be found from [here](http://appium.io/slate/en/master/?javascript#about-appium) 24 | 25 | #### Android setup 26 | 27 | sh ./android.sh 28 | 29 | ##### finally set the android home. Edit your .bash_profile and add following command to .bash_profile and save it. 30 | 31 | export ANDROID_HOME=/Users/your-username/your-andorid-sdk-path 32 | 33 | export PATH=$PATH:$ANDROID_HOME/tools 34 | 35 | ## Check installation is success or not 36 | on terminal type `appium-doctor` . It will list out Diagnostic report. 37 | 38 | ## Licensing 39 | 40 | MIT 41 | -------------------------------------------------------------------------------- /android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Welcome to appium setup made easy for ... android" 3 | npm install -g appium 4 | path=$($HOME) 5 | echo $path 6 | cd $path 7 | mkdir appium_android_setup 8 | cd appium_android_setup 9 | echo "Downloading Android SDK tool ...." 10 | curl -O 'https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip' 11 | mkdir android 12 | mv sdk-tools-darwin-*.zip android/ 13 | cd android 14 | unzip sdk-tools-darwin-*.zip 15 | echo "Accepting Android SDK licenses" 16 | yes Yes | tools/bin/sdkmanager --licenses 17 | echo "Updating the Android sdk manager tool" 18 | yes Yes | tools/bin/sdkmanager --update 19 | echo "Downloading other dependency tools ..." 20 | tools/bin/sdkmanager "platforms;android-25" "build-tools;25.0.2" "extras;google;m2repository" "extras;android;m2repository" 21 | rm sdk-tools-darwin-*.zip 22 | echo "make sure to set below path as ANDROID_HOME" 23 | pwd 24 | -------------------------------------------------------------------------------- /ios.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Welcome to appium setup made easy for ... ios" 3 | echo "$1" | sudo -S chown -R `whoami` /usr/local 4 | npm install -g appium 5 | npm install -g authorize-ios 6 | echo "$1" | sudo -S authorize-ios 7 | echo "$1" | sudo -S xcode-select -s /Applications/Xcode.app/Contents/Developer 8 | npm install -g ios-deploy 9 | echo "$1" | gem install xcpretty 10 | brew install carthage 11 | brew install libimobiledevice --HEAD 12 | brew upgrade libimobiledevice --HEAD 13 | brew install ideviceinstaller 14 | brew upgrade ideviceinstaller 15 | brew install ios-webkit-debug-proxy 16 | brew upgrade ios-webkit-debug-proxy 17 | echo "$1" | sudo -S chmod +x /var/db/lockdown 18 | cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/ 19 | mkdir -p Resources/WebDriverAgent.bundle 20 | ./Scripts/bootstrap.sh -d 21 | echo "Opening Xcode ............" 22 | open WebDriverAgent.xcodeproj 23 | --------------------------------------------------------------------------------