最近抽时间做了下移动端自动化测试的调研
设备:mac10.12.6
手机系统:iOS11.0
步骤
1、安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2、安装libimobiledevice
brew install libimobiledevice --HEAD
3、安装carthage
brew install carthage
4、安装node(目的是安装npm)按照官方的地址[https://nodejs.org/en/download/](https://nodejs.org/en/download/)。
5、安装ios-deploy
npm install -g ios-deploy
6、安装xcpretty
gem install xcpretty
7、安装appium1.6.1(dmg)
https://github.com/appium/appium-desktop/releases/tag/v1.6.1
8、安装appium-xcuitest-driver
npm install appium-xcuitest-driver
9、github下载WebDriverAgent到桌面
https://github.com/facebook/WebDriverAgent
进入appium-xcuitest-driver/WebDriverAgent目录全部替换
终端命令行在此目录下执行
sh ./Scripts/bootstrap.sh #无报错就OK
10、进入appium-xcuitest-driver/WebDriverAgent目录,xcode运行WebDriverAgent,改为Automatically manage signing
11、选择WebDriverAgentRunner,执行bulid,test
打开Appium


输入:

手机连接电脑:首先执行第11步,使WebDriverAgent运行在手机端,然后点击Appium的Start Session按钮:

可以调起要测试的目标APP,前提是目标APP已安装到手机。
整理计划:
原理
环境
脚本
测试报告收集
网友评论