STF
github地址:https://github.com/openstf/stf
安装命令:
brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config
npm install -g stf
rethinkdb &
stf local
api 访问
curl -H "Authorization: Bearer 7112b6fbce3745ffb62f21e8048a4e25300bfa0aea4148239939fa6e79bfec07" http://127.0.0.1:7100/api/v1/devices |jq
seleium grid
参考: https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/grid.md
Selenium StandAlone Server:https://www.seleniumhq.org/download/
启动hub
java -jar selenium-server-standalone-3.12.0.jar -role hub
配置节点
{
"capabilities":
[
{
"browserName": "android x86",
"version": "6.0",
"maxInstances": 1,
"platform": "android"
}
],
"configuration":
{
"cleanUpCycle": 2000,
"timeout": 30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url": "http://192.168.31.99:4723/wd/hub",
"host": "192.168.31.99",
"port": 4723,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "192.168.31.99",
"hubProtocol": "http"
}
}
启动appium
appium --nodeconfig android_1.json
坑:
- driver需要quite,不然hub会一直等待
- java-client需要升级到6.0.x以上
作业
作业1
安装stf,并连接一台设备和一台android模拟器(基于android studio),把截图发到回复里
作业2
安装appium grid,使用hub做自动化,把示例代码贴上来。