Sonic开源的云真机测试平台搭建四:通过Mac端接入Android设备
TBD!
一、安装npm
1、登录 NodeJS 官网:https://nodejs.org/en/
2、下载左侧的LTS稳定版本:Recommended For Most Users(是一个pkg的包)
3、下载完成后,是一个pkg的包,包名为node-v18.12.1.pkg,一路点击next,咔咔咔一顿装
4、查看npm版本
XXX-MacBook-Pro:~ chunyanzhang$ node --version v18.12.1 XXX-MacBook-Pro:~ chunyanzhang$
二、配置JDK
XXX-MacBook-Pro:~ chunyanzhang$ Java -version openjdk version "15.0.2" 2021-01-19 OpenJDK Runtime Environment Corretto-15.0.2.7.1 (build 15.0.2+7) OpenJDK 64-Bit Server VM Corretto-15.0.2.7.1 (build 15.0.2+7, mixed mode, sharing)
三、配置SDK
XXX-MacBook-Pro:~ chunyanzhang$ adb --version Android Debug Bridge version 1.0.41 Version 33.0.3-8952118 Installed as /Users/chunyanzhang/Library/Android/sdk/platform-tools/adb
四、命令行安装 appium
- 配置淘宝镜像:npm config set registry https://registry.npm.taobao.org
- 安装adbkit:npm i -g adbkit
- 安装appium:npm i -g appium
- 报错就清理缓存:npm cache clear --force,继续 npm i -g appium
- cmd窗口验证:appium --version
XXX-MacBook-Pro:~ chunyanzhang$ sudo su sh-3.2# npm config set registry https://registry.npm.taobao.org sh-3.2# npm i -g adbkit added 11 packages in 2s npm notice npm notice New major version of npm available! 8.19.2 -> 9.2.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0 npm notice Run npm install -g npm@9.2.0 to update! npm notice sh-3.2# npm i -g appium added 686 packages in 8s sh-3.2# appium --version 1.22.3
五、安装 appium的GUI客户端