Skip to content

Latest commit

 

History

History
146 lines (127 loc) · 7.95 KB

Appium Windows Installation Instructions.md

File metadata and controls

146 lines (127 loc) · 7.95 KB

#Appium Windows Installation

###Get Processor & CPU type.

  • Goto Control Panel\System and Security\System
  • Processor: Intel or AMD
  • System type: 64-bit x64-based or 32-bit x86-based

If you have AMD chipped PC

  • Follow the instructions here to install Genymotion emulator. Choose either 64-bit or 32-bit.
  • Or... bring your own android device to the workshop and a micro-usb cable.

###Install JAVA

  • Open CMD and check java version: c:\> java -version
    • If the version is less than 1.8 or the command is not recognized you need to install java.
    • If the version is 1.8 or greater then go to Ruby install.
  • Download and install 64-bit or 32-bit
  • Make note of the installation/destination path! You will need this later. e.g. C:\Program Files\Java\jdk1.8.0_92

###Install Ruby

  • Open CMD and check ruby version: c:\> ruby -v
    • If the version is less than 2.2 or the command is not recognized you need to install ruby.
    • If the version is 2.2 or greater then go to Node install.
  • Download and install 64-bit or 32-bit
  • Make note of the installation/destination path! You will need this later. e.g. c:\Ruby22-x64\bin

###Install Node (We need this for paralleization)

  • Download and install 64-bit or 32-bit
  • Make note of the NPM installation/destination path! You will need this later. e.g. C:\Users\justin\AppData\Roaming\npm

###Install Android SDK

  • Click here to install SDK.
  • Make note of the installation/destination path! You will need this later. e.g. C:\Users\justin\AppData\Local\Android\sdk

###Add Environment Variables

  • Goto Control Panel\System and Security\System > Advanced system > Edit Variables...
  • Under "User variables for your_user_name"
  • Highlight the Path variable.
    • Click Edit > New
    • Add path for sdk\tools. e.g. C:\Users\justin\AppData\Local\Android\sdk\tools
    • Click OK
    • Add path for sdk\platform-tools. e.g. C:\Users\justin\AppData\Local\Android\sdk\platform-tools
    • Click OK
    • Add path for ruby location. e.g. c:\Ruby22-x64\bin
    • Click OK
    • App path for node NPM locaton. e.g. C:\Users\justin\AppData\Roaming\npm
    • Click OK
  • Add ANDROID_HOME variable.
    • Click the New... button.
    • Set name: ANDROID_HOME
    • Set value: C:\Users\justin\AppData\Local\Android\sdk (change this to your sdk path)
    • Click OK
  • Add JAVA_HOME variable.
    • Click the New... button.
    • Set name: JAVA_HOME
    • Set value: C:\Program Files\Java\jdk1.8.0_92
    • Click OK
  • See example here for environment variable.
  • See example here for Path variables.
  • Close all CMD's and RESTART PC!

###Test Environment Variables

  • Run C:\> java -version in CMD. You should see something close to this java version "1.8.0_92" returned.
  • Run C:\> ruby -v in CMD. You should see something close to this ruby 2.2.4p230 (2015-12-16 revision 53155).
  • Run c:\> emulator -help. You should see menu options for android emulator manager.
  • Run c:\> npm. You should see the npm menu options.
  • If any of the above is not working check to make sure the install locations are correct and reflected correctly in the path environment variable.

###Install Ruby Development Kit

  • Download and install 32-bit or 64-bit
  • Extract the files to c:\ruby-dev-kit.
  • Open CMD and goto cd c:\ruby-dev-kit
  • Run ruby dk.rb init
  • Run ruby dk.rb install
  • Test the installation by running gem install json --platform=ruby --source http://rubygems.org in CMD. You should see "1 gem installed" if all goes well.
  • Find more Devkit installation information here.

###Update Android SDK

  • Run c:\> android sdk in CMD.
  • Install or update by selecting everything you see marked as installed here and here for API Level 23.
  • Note: We are using API Level 23 for this workshop!
  • Click the Install .. packages...
  • Accept the license for each package and then click the Install button.

###Verify Platform-tools are installed

  • Run c:\> adb in CMD. You should see this Android Debug Bridge version 1.0.32 and additional menu options.

###Create Android Emulator

  • For Intel PC's.
    • Open File Explorer and Goto (path to sdk)\sdk\extras\intel\Hardware_Accelerated_Execution_Manager
    • Double click the intelhaxm-android.exe file and install.
  • Run c:\> android avd in CMD.
  • Click Create...
  • Set AVD Name: EM1
  • Select Device: Nexus S(4.0", 480 x 800:hdpi)
  • Select Target: Android 6.0 API Level 23
  • For Intel PC's.
    • Select CPU/ABI: Intel Atom (x86)
  • Select Skin: Skin with dynamic hardware controls
  • Select Emulation Options: Use Host GPU
  • The setup should look like this for Intel computers.
  • Click OK
  • Highlight EM1 in AVD menu and click Start and then Launch.
  • For Intel PC's.
    • Verify avd output on startup includes:
    • Hax is enabled
    • HAX is working and emulator runs in fast virt mode.
    • Verify emulator fully starts and you see the android home/desktop screen.

###Install Appium IDE

  • Download, unzip and install here
  • Make note of the installation/destination path. e.g. C:\Program Files (x86)\Appium
  • Create desktop icon.

###Install Appium via NPM

  • Run C:\> npm install -g appium-doctor

  • Run C:\> appium-doctor (checks setup is correct on machine)

    • Verify "info AppiumDoctor Everything looks good, bye!" is displayed.
    • If there are things missing please go back to the install instructions or environment variable setup.
  • Run C:\> npm install -g appium

    • Verify appium installed correctly by doing C:\> appium -v
  • Note: You might get an error when install appium with NPM. If so, open a powershell window as administrator. e.g. search for powershell in start menu, then right click powershell and select run as administrator.

    • In powershell run: Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
    • Run: npm install -g npm-windows-upgrade
    • Run: npm-windows-upgrade
    • Run: npm install -g appium

###Install Sublime (We should all use same editor)

###Install Allure Report Framework

  • Download and unzip allure here
  • Create a allure directory. Run mkdir C:\allure
  • Move all allure folders/files from Downloads to C:\allure.
  • Add environment variable for allure.
    • Goto Control Panel\System and Security\System > Advanced system > Edit Variables...
    • Under "User variables for your_user_name"
    • Highlight the Path variable.
    • Click Edit > New
    • Add path for allure executables. e.g. C:\allure\bin
    • Click OK
  • Close shell windows and open a new one.
  • Test allure works. Run C:\ allure in shell. You should get allure menu options returned.
  • Click here for more install information.