JDK 下载
链接:https://pan.baidu.com/s/15FhVDTl-2msOqzQRAhD4gA
提取码:ziof
配置环境变量
SDK下载
Download Android Studio and SDK tools | Android Developers
模拟器
SDK 自带的工具
环境变量配置ANDROID_HOME
:SDK安装目录
Path
:%ANDROID_HOME%\tools;%ANDROID_HOME%\build-tools\29.0.3;%ANDROID_HOME%\platform-tools;
adb
aapt
aapt dump badging C:\Users\dubo_\IdeaProjects\appium\TestData\App\WeChat.apk
Desktop
链接:https://pan.baidu.com/s/1P_Dsifzmpe--8lnxR8YiSw
提取码:9r4v
Appium配置
获取platform版本:adb shell getprop ro.build.version.release
获取api版本:adb shell getprop ro.build.version.sdk
##模拟器连接
nox_adb.exe connect 127.0.0.1:62001adb连接各种模拟器
mumu adb connect 127.0.0.1:7555
夜神 adb connect 127.0.0.1:62001
itools adb connect 127.0.0.1:54001
逍遥 adb connect 127.0.0.1:21503
VIsual Studio adb connect 127.0.0.1:5555
##查看设备信息
adb devices##查看Android版本
adb shell getprop ro.build.version.release##查看APK信息
aapt dump badging D:\BaiduMap.apk##查看adb.exe和nox_adb.exe版本
adb version
nox_adb version首先查看一下activity,使用命令
打开被测app,输入命令adb shell dumpsys window | findstr mCurrentFocus启动被测app,输入命令
>adb shell dumpsys activity activities >E:\aaa.txt
##Appnium连接配置信息
{
"platformName": "Android",
"platformVersion": "5.1.1",
"deviceName": "127.0.0.1:62001",
"appPackage": "com.baidu.BaiduMap",
"appActivity": "com.baidu.baidumaps.WelcomeScreen"
}
微信配置
{
"platformName": "Android",
"platformVersion": "5.1.1",
"deviceName": "127.0.0.1:62001",
"appPackage": "com.tencent.mm",
"appActivity": "com.tencent.mm.ui.LauncherUI"
}
其它
{
"platformName": "Android",
"platformVersion": "5.1.1",
"deviceName": "127.0.0.1:62001",
"appPackage": "com.dangbeimarket",
"appActivity": "com.dangbeimarket.activity.WelcomeActivity"
}
参考 APP自动化测试——Appium环境搭建及基础脚本编写(极其详细)_一个Tester的博客-CSDN博客_appium自动化测试教程