Appium automation environment construction

1. Preparation: Install the kit

  • android-sdk-windows-appium
  • android-sdk

1. After downloading, it is a compressed package format, so the first step is to unzip

2. After unzipping, you need to configure SDK environment variables

关于环境变量的配置有2步骤:

1. Create a new ANDROID_HOME variable name, variable value: D:\sdk\android-sdk-windows, the variable value is the location of your sdk

Open the computer-properties-advanced system configuration-advanced-environment variables.


New system variable

2. Add two new paths in the system variable Path: %ANDROID_HOME%\platform-tools %ANDROID_HOME%\tools

3. Verify that the environment variable configuration is Ok

Shortcut key to open windows+r, cmd to open the command control character, enter adb version, `If the version and path of adb are displayed as follows, the environment variable configuration is ok

  • appium-windows
  • appium-desktop package------------- app automation testing framework

Install appium-desktop

Download link: https://github.com/appium-desktop/releases If the link is not available, you can contact to change

It is recommended not to use the latest version, the latest version may have version instability problems

  • nox_setup Night God simulator installation package

2. Appium installation and use

1. After downloading and installing, an appium icon should be displayed on the desktop

2. Change the display language

After opening, click view --language to switch

The port used here is 4723, it is not recommended to change

How to check if the port is occupied, you need to use a dos command:

netstat -ano | findstr 4723

This is because I opened the appium checker, so I found out a piece of port information.

If you turn off appium and enter this information again, it will not be displayed

3. Start the server, the interface is as follows

After startup, you will see the display'server running'

Click to start the inspector session,

After opening, there are three big blocks, automatic setting, custom server and cloud provider. Commonly used is to set this part automatically.

Required function configuration

deviceName

How to get deviceName:

1. Night God Simulator

    获取方法:adb devices

If this error occurs, it means that the adb that comes with the Night God Simulator conflicts with the adb version in the sdk

Solution: copy the adb version in the sdk and replace the version in the night god simulator, just keep the two adb versions consistent

Connect to the night god simulator: adb connect 127.0.0.1:62001

2.android real machine

Connect to PC via USB

Open the developer options: Settings-About-Version Number-Click the version number 5 times

Turn on USB debugging, developer option-USB debugging

platformName platform name

1.Android

2.IOS

appPackage APP package name

1. Get the package name

2.aapt tool

1.进入aapt当前目录的命令行模式

2.aapt dump badging apk package path

2. The first line of parsing is the package name

If you

① Engage in functional testing and want to advance automated testing

②I have been in the testing industry for one or two years, but still can’t type code

③ Interviews with big companies repeatedly hit the wall

I recommend a group! Come on~~ Tester, 313782132 (There are technical experts in the Q group to communicate and share, the value of learning resources depends on your actions, don’t be a "collector") Get more technology and interview materials

May you and I meet and you will find something! Welcome to pay attention to the WeChat public
account : Sad Hot Tips 1. Receive a 216-page software test engineer interview book for free.
2. The software test learning route and the corresponding video learning tutorial are free to share!

Guess you like

Origin blog.csdn.net/weixin_50829653/article/details/112238619