四、多设备管理平台STF

1、OpenSTF简介

  • 地址:https://github.com/openstf/stf
  • OpenSTF是一个手机设备管理平台
  • 可以对手机进行远程管理、调试、远程手机桌面监控等操作

docker安装

  • 拉取镜像

    • docker pull openstf/stf:latest
    • docker pull sorccu/adb:latest
    • docker pull rethinkdb:latest
  • 启动rethinkdb

    • docker run -d --name rethinkdb -v /srv/rethinkdb:/data --net host rethinkdb rethinkdb --bind all --cache-size 8192 --http-port 8090
  • 启动stf

    • docker run -d --name stf --net host openstf/stf stf local --allow-remote
  • 访问:localhost:7100


    image.png

Tips:一定要先启动rethinkdb再启动stf

真机远程调试演示

  1. 真机开启远程调试端口:adb -s device-name tcpip 5555开启5555调试端口
    image.png
  2. 真机与PC机处于同一网段,可以连接同一WiFi,然后进入手机的网络设置,查看IP地址;PC机使用ipconfigifconfig查看IP地址,检查两者的IP是否在同一网段
  3. 连接真机:adb connect 真机IP地址:5555,需要连接数据线,加载完成后便可拔掉数据线
    image.png

下一节:Selenium Grid方法,包括构建支持Android、IOS、Web的多架构自动化测试平台。

你可能感兴趣的:(四、多设备管理平台STF)