Build an appium automated test environment under Windows

1. Download JDK and configure JDK environment variables

After downloading, click to install.

Right click on this computer---properties---advanced system configuration---environment variables---system variables


Add environment variable in system variable <1>

Name: JAVA_HOME
Value: The absolute path of jdk installed on the computer

 

 <2> Add variable value to path:
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin

It should be noted that after the jdk has just been downloaded, the jdk path will be added to the path by default. At this time, you need to replace the installed jdk path and go to the bin directory, as shown in the following figure 

New CLASSPATH

insert image description here 

and copy the following values ​​into it:

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

<3> Verify that jdk is configured well
Open cmd and enter javac

insert image description here

 

Information about JAVA appears, indicating that the configuration is successful

2. Install the Android SDK and configure the SDK environment variables

<1> Add environment variable
name: ANDROID_HOME
value: absolute path where Android SDK is installed on the computer

<2> Add variable value to path:

Relative path configuration Android:
%ANDROID_HOME%\tools
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\build-tools\android-4.3 %
ANDROID_HOME%\platforms\android-18
%ANDROID_HOME%\build-tools\android-4.3\aapt .exe
<3> Check whether the Android SDK is configured successfully
Open cmd and enter adb -version

insert image description here

 The version number appears, indicating that the configuration is successful

3. Install Node.js

Because Appium is implemented using nodejs, so node is an interpreter, first you need to confirm that it is installed

Baidu network disk share Node.js download link:
Link: https://pan.baidu.com/s/1r-KoBUy06hCkLTolbhBrFQ Extraction code: 2ive

<1> After downloading and obtaining the installation file, double-click the installation file directly, and complete the installation of nodejs according to the prompt of the program (you can modify the installation path)

<2> Configure Node.js environment variables
Add the installation path of Node.js to the path, which is the directory where the node.exe file is located

<3> Verify whether the Node_js configuration is successful
Open cmd and enter npm

insert image description here

The path of npm appears, indicating that the configuration is successful

4. Install Appium

Official website download address: https://bitbucket.org/appium/appium.app/downloads/

insert image description here

Just install it without thinking

5. Install the Appium service

<1> Open cmd and run the command:
npm install -g appium-doctor

insert image description here

All the green checkmarks in the red box indicate that the environment variables related to appium have been successfully completed. 

 

Guess you like

Origin blog.csdn.net/suixing6/article/details/126961376