UI自动化测试

349 阅读1分钟

一、FastMonkey

0.查看所有设备的udid终端命令:instruments -s

1.仓库地址:https://github.com/zhangzhao4444/Fastmonkey

2.使用方法: https://testerhome.com/topics/9810

3.基本的配置: 3.1 配置端口 iproxy 8001 8001

3.2 打开模拟器 xcodebuild -project XCTestWD.xcodeproj \ -scheme XCTestWDUITests \ -destination 'platform=iOS Simulator,name=iPhone 8 Plus' \ XCTESTWD_PORT=8001 \ clean test

3.3 运行 curl -X POST -H "Content-Type:application/json" -d "{\"desiredCapabilities\":{\"deviceName\":\"HJQ iPhone\",\"platformName\":\"iOS\", \"bundleId\":\"com.nnddkj.Meimeila\",\"autoAcceptAlerts\":\"false\"}}" http://127.0.0.1:8001/wd/hub/monkey

二、Appium

1.在目录下/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=8B2AF37B-B063-49BE-B907-2205BEAF19A9' test

2.最终脚本是python文件实现

三、Macaca