程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

One of the appium tutorials for app automated testing - environment building (appium+python+mumu simulator)

編輯:Python

app One of the automated test tutorials —— Environment building (appium+python+mumu Simulator )

  • install JDK
    • 1. Official website download address
    • 2. Download the latest version JDK
    • 3. install
    • 4. Configure environment variables
    • 5. Verify the installation
  • install Android SDK
    • 1. Download address
    • 2. download Android studio And install
    • 3. Configure environment variables
    • 4. Verify the installation
  • install NODE.JS
  • install python Environmental Science
  • install appium
    • 1. Download address
    • 2. Download and install
    • 3. open appiun To operate
  • Appium-Python-Client
  • install mumu Simulator

install JDK

1. Official website download address

jdk Download address

2. Download the latest version JDK

3. install

4. Configure environment variables

My computer - attribute - Advanced system setup - environment variable - New system variable

1) newly build JAVA_HOME Variable

Variable name :JAVA_HOME
A variable's value : Fill in JDK The installation directory ( Such as :C:\Program Files (x86)\jdk-15.0.1

2) edit path Variable ( If not , Create a new one )

Variable name :Path
A variable's value :;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
( Do not delete the original variable value , Add... Directly at the end )

3) newly build CLASSPATH Variable

Variable name :CLASSPATH
A variable's value :.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar( There's one in front ".", Don't miss it. )

5. Verify the installation

cmd Enter the command :java -version

The above results appear , Indicates successful installation .java version "1.8.0_281" For the downloaded version

install Android SDK

1. Download address

Recommend to pass android studio install , The advantage is that you can update versions and tools android studio Download address

2. download Android studio And install

See... For the specific installation process Installation steps ( Articles written by others , Under reference , I won't repeat it here )
Android studio Bring it with you sdk, If you need to select another version or download related tools , Within the software :file-Settings-System Settings-android SDK

3. Configure environment variables

My computer - attribute - Advanced system setup - environment variable - New system variable

1) newly build JAVA_HOME Variable

Variable name :ANDROID_HOME
A variable's value : Fill in SDK The installation directory

2) edit path Variable ( If not , Create a new one )

Variable name :Path
A variable's value :;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;
( Do not delete the original variable value , Add... Directly at the end )

4. Verify the installation

cmd Enter the command :adb version

The above results appear , Indicates successful installation .Android Debug Bridge version 1.0.41 For the downloaded version

install NODE.JS

  1. Download address
    node Environment download address
    because Appium Of server The end is node.js So you need to install node.js. install node.js after , You can also follow the official tutorial directly npm install Appium, This approach is not recommended .
  2. Validation command :

cmd Enter the command :npm

install python Environmental Science

  1. Download address
    python Download address
  2. Download and install

Be careful : In the installation step , Pictured above , Pay special attention to the hook Add Python x.x to PATH, Otherwise, you need to add... To the environment variable path route
2. Validation command :

cmd Enter the command :python -V

appear Python 3.9.1( Version installed for ), Installation succeeded

install appium

1. Download address

appium-desktop Download address
Choose a version to download , And install , If it is windows System , Select the link in the red box below to download .

2. Download and install

Follow the prompts step by step to install

3. open appiun To operate

As shown in the figure below

Appium-Python-Client

choice python As an automated test scripting language

  1. install pip

cmd Enter the command :
pip install Appium-Python-Client
pip install selenium
Waiting for download ( Download separately )
Verify the installation is successful :cmd Enter the command :pip list

package In the list Appium-Python-Client 1.0.2;selenium 3.141.0( Version installed for ), Installation succeeded

  1. install pycharm

download pycharm Software :pycharm Download address
stay PyCharm in , Click on File -> Settings -> Project ->
Python Interpreter -> + -> Input selenium and Appium-Python-Client, Click on install, Here's the picture

install mumu Simulator

This is a fool installation

  1. Download address
    mumu Simulator download address
  2. Connecting device

1)cmd Enter the command :adb connect 127.0.0.1:7555
2)cmd Enter the command :adb devices
Show :List of devices attached;127.0.0.1:7555 device The device is successfully connected
3) Disconnected and reconnected :adb kill-server;adb start-server;adb devices see

thus , Installation of all environments complete !!! What a big project


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved