Environment configuration for Appium mobile automated testing

Many companies prefer appuim for mobile automated testing. To understand its features and advantages, please visit http://www.testclass.net/appium/appium-base-summary/

To start automated testing, many people think, wow, what technology to use, what framework to use, and whether to write test cases well. Haha, if you guess correctly, it is estimated that many people’s self-learning path may end. It depends on the environment configuration. It is really not easy.

Okay, let's take a look first, what are the dependencies of the environment, and attach the download address

  1. JAVA JDK (omitted, please Baidu by yourself)
  2. Andriod SDK (http://tools.android-studio.org/index.php/sdk)
  3. node  (https://nodejs.org/)
  4. appuim ( https://bitbucket.org/appium/appium.app/downloads/  or http://pan.baidu.com/s/1jGvAISu

The download and installation process is omitted. The important part is the configuration of environment variables.

  1. Configure JAVA environment variables

    JAVA_HOME   D:\Java\jdk1.8.0_25

    CLASSPATH     .;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar

    Path     %JAVA_HOME%\bin;

    Test: Enter java or javac in CMD, you can see the command prompt

    

  2. Configure Android environment variables

    ANDROID_HOME value is the installation path of the Android SDK

    Path      (%ANDROID_HOME%\platform-tools; %ANDROID_HOME%\tools;) 

    

       If it prompts that adb is not an internal or external command, nor is it a runnable program or batch file, you can simply and rudely add the directory where adb is located in Path in the environment variable: D:\android\sdk\platform-tools.

    3. Configure nodejs environment variables

      Path D:\nodejs\; (that is, the directory where the node.exe file is located)

      Test: Enter node-v in CMD, you can see the version number

      

    4. Configure the appuim environment variable

      1) Open the CMD window and execute the npm install -g appium command to start installing Appium. Appium is installed to C:\Users\Administrator\AppData\Roaming\npm\ by default. 

      2) Add the path C:\Users\Administrator\AppData\Roaming\npm\ (the directory where the appium executable is located) to the environment variable Path

 

    The second method installs Appium.

      Download the Appium tarball

      Configure appium environment variables after decompression

      Path D:\tools\appium\Appium\node_modules\.bin; 

       Test: Enter appium-doctor in CMD, you can see All Checks were successful 

      

 

Brother Zeng said: 

If the environment variables are variables that need to be referenced, such as ANDROID_HOME, JAVA_HOME, JMETER_HOME, etc., be sure to remember two points:

1. There must be only one path in the variable value

2. At the end of the path, you must not add a semicolon (I have been lying in the pit of this semicolon for too long, and I didn't find the reason for the semicolon at all, and I almost gave up halfway)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324405676&siteId=291194637