Appium includes 2 major components, Appium Inspector and Appium Server (its version with interface is also called Appium Desktop). The former is used to analyze the elements in the mobile App interface to assist in the development of automated test scripts; the latter is a server that accepts requests from scripts and manipulates the App UI.

Appium Server uses the WWP protocol (WebDriver Wire Protocol) consistent with Selenium to accept operation requests in JSON format, and after parsing, execute them on the connected mobile phone. Appium also provides many API libraries in different languages for writing test scripts. These codes are essentially using the WWP protocol to communicate with Appium Server.
Therefore, you can even register it to Selenium Hub Appium Server . Thus, in Appium test script, can be programmed to access the Selenium the Grid , to find and use with the specified test capabilities (e.g. { "platformName": "iOS" , "deviceName": "iPhone 7"}) of Appium Node .

Appium environment deployment

  1. Download JDK 11 from Oracle website , install and record the directory as Dir1;
  2. Download and install Android Studio from Google developer site
  3. Open Android Studio and select SDK Manager in the More Actions menu;
    image.png
  4. Click the Edit Android SDK Location open the following window;
    image.png
  5. The Anroid SDK Location directory at the bottom of the record is Dir2, which can be modified to the path you think is appropriate;
  6. Then all the way to Next, complete the configuration and download;
  7. Set the JAVA_HOME and ANDROID_HOME environment variables, and add java and adb executable files to the PATH environment variable:
    Windows system

    1. Enter sysdm.cpl on the command line to open the system properties window;
    2. Click advanced label, environment variable button in turn to open the environment variable editing window;
    3. user variable list at the top, click the New button. Input variable name and variable value into JAVA_HOME and JDK installation directory Dir1 respectively, and save;
    4. Refer to the previous step to create a new environment variable named ANDROID_HOME, the variable value is the installation directory Dir2 of the SDK Manager in the Android Studio;
    5. user variables at the top, select the Path variable and click the edit button to open the modification window;
    6. Append %JAVA_HOME%\bin and %ANDROID_HOME%\tools to the Path variable. In Win7, it is a single-line editing mode, please use English semicolons to separate the paths;
    7. Reopen the command line window to make the environment variable settings take effect.

    Linux, Mac system

    1. Edit the .bash_profile file in the user directory;
    2. Add the following content at the end of the file, and modify the values of JAVA_HOME and ANDROID_HOME to the Dir1 and Dir2 recorded previously;

      export JAVA_HOME=/Users/aaron/rd/sdk/jdk11
      export PATH=$JAVA_HOME/bin:$PATH
      export ANDROID_HOME=/Users/aaron/rd/sdk/android
      export PATH=$PATH:$ANDROID_HOME/tools
    3. Execute source ~/.bash_profile to make the setting effective.
  8. Plug in the mobile phone and execute the following commands respectively to confirm that the environment variables are set successfully;

    macbook:~ aaron$ java --version
    java 11.0.7 2020-04-14 LTS
    Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS)
    Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)
    macbook:~ aaron$ adb devices
    List of devices attached
    a0c865fd    device
  9. From here download Appium Inspector, and installation;
  10. Download Appium Server from here , and install it.

thematic catalog


陈哥聊测试
158 声望3.3k 粉丝

资深敏捷测试顾问,国内知名项目管理软件禅道团队成员。