【12期测试开发】测试框架 SeleniumGrid 实战

参考链接

selenium grid 下载地址:
https://www.selenium.dev/downloads/

appium node 结点配置:
http://appium.io/docs/en/advanced-concepts/grid/

Selenium Grid 工作流程

执行命令

启动 selenium hub 命令:

java -jar selenium-server-standalone.jar -role hub

启动 appium server node 结点命令:

appium -p 4723 --nodeconfig node1.json
appium -p 4725 --nodeconfig node1.json
appium -p 4727 --nodeconfig node1.json

appium node 结点配置

{
  "capabilities":
      [
        {
          "browserName": "ANDROID",
          "deviceName": "emulator-5554",
          "version":"6.0",
          "maxInstances": 1,
          "platform":"ANDROID"
        }
      ],
  "configuration":
  {
    "cleanUpCycle":2000,
    "timeout":30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "url":"http://localhost:4723/wd/hub",
    "host": "localhost",
    "port": 4723,
    "maxSession": 1,
    "register": true,
    "registerCycle": 5000,
    "hubPort": 4444,
    "hubHost": "192.168.56.1",
    "hubProtocol": "http"
  }
}

课后作业

关闭