Step on the way to the pit, built Appium automated testing environment

I am ready to engage in because of the recent automation app, so we set up the process environment record (mainly stepped on several pit)

During a little agitated, later adjusted under the attitude succeeded somehow.

 

 

A, Appium preparation software environment to build

The software required to follows:

1. Installation JDK1.8 and higher (32 to download the 32-bit, 64-bit to 64-bit download)

2.Android sdk

3. Install node.js

4. Installation Appium desktop

5.Appium-python-client

Second, begin to build

2.1.JDK installation

After downloading the installation package good jdk directly to the next step until the installation is complete, the installation configure the environment variables After JDK: Properties computer → → → → Advanced Settings Advanced System environment variables;

New system variable JAVA_HOME variable → 

Fill in the value of the variable jdk installation directory (such as D: \ Java \ jdk1.7.0)

System variables Path variable → Edit → Looking

In the last input value of the variable% JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin;

(Note that the original value of the variable Path end there; number, if not, the first input; number enter the code above)

New system variable CLASSPATH variable →

Fill in the value of the variable;.% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ tools.jar (Note that the preceding bit)

System variable configuration is completed

Verify the configuration is successful run cmd enter java -version (space between java and -version)

If the version information is displayed as shown in FIG successfully install and configure

 

 

 

2.2 Android sdk mounted (where there is a pit)

http://tools.android-studio.org/index.php/sdk

Installation steps are as follows:

 

1, extract platform-tools_r28.0.2-windows.zip to a local directory

2, double-click SDKManager.exe

 

3, in the SDK Manager interface which, just check:

Tools among the Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools Extras directory.

 

 

 

 

The other not and will not check.

 

Please note that selected by default uncheck!

Open SDK Manager, select the default Android sdk, please be sure to cancel.

 

 

4, configure the environment variables:

 

◆ Add ANDROID_HOME environment variables, configuration sdk root directory.

 

In the above screenshot,

ANDROID_HOME=D:\android-sdk-windows

 

 

◆ add three elements in the PATH variable:

 

%ANDROID_HOME%\platform-tools

 

%ANDROID_HOME%\tools

 

%ANDROID_HOME%\build-tools\28.0.3

 

 

Detection:

 

Cmd into the command line, type adb version

 

The normal version on display adb okay.

 

2.3 Installation nodejs

nodejs official website Download:

 

https://nodejs.org/en/download/

appium operation depends on nodejs, so the first installation nodejs.

 

 After downloading all the way to fool installation, the installation is complete, run cmd, enter npm. As this is the case the following figure appears will succeed.

 

 

 

 

 2.4 Installation Appium-desktop (this time is also a pit)

Official website address  https://github.com/appium/appium-desktop/releases

Download the version for your computer system

 

 

 Then the next step is to click on all the way, the installation was successful. At this point it should generate exe file, click to open the run.

 

 2.5 Appium-Python-Client Installation

Installation is relatively simple here, but only with the python installation environment.

Use the pip python command, direct-line installation:

Pip-python-client install epochs

III. Installation simulator

In fact, I did not do this step.

Installation simulator (real machine user can skip this step)

In this step, select the night god simulator.

Yagami simulator official website address:

 https://www.yeshen.com/

After completing the download and install. Desktop will have two icons: a god simulator, night God to open up device.

 

Night God Simulator: The default Android version 4.4.2

 

Night God to open up device: Android 5.1 emulator can be increased, Android 7.1 emulator.

 

Before starting the simulator, the simulator installation path replacement among nox_adb.exe

 

The first step: adb.exe copy at% ANDROID_HOME% \ platform-tools directory to your desktop, change the name to nox_adb.exe

 

 Step two: The first step in nox_adb copied to a god simulator installation directory, replacing the original file.

 

 Go to start the night God simulator.

Then in cmd command line which, enter the command: adb devices

 

 

After all the above steps the installation is complete, congratulations, good environment to build!

 

 

 

Guess you like

Origin www.cnblogs.com/jc-home/p/11874892.html