历元 - 并行执行(网格)

问题描述 投票:1回答:5

有没有办法在appium中运行并行测试,就像硒网格一样?我们如何在appium中设置不同的节点?

selenium parallel-processing appium
5个回答
2
投票

问题在于,appium专门使用iosSimulator或Genymotion VM,而不是真正设计为在这样的一台机器上并行运行。但是,您可以设置多个具有自己的appium实例的VM(我觉得这会很慢,但理论上是一个选项),或者使用BrowserStack,Sauce Labs或类似的东西,以便一次运行多个测试。


2
投票

是的,我们可以像使用GRID概念的Selenium一样实现并行执行。

你需要通过在ur json文件中放置以下内容来启动节点

    { "capabilities": 
    [ 
    { "browserName": "<e.g._iPhone5_or_iPad4>",
     "version":"<version_of_iOS_e.g._7.1>",
     "maxInstances": 1, 
     "platform":"<platform_e.g._MAC_or_ANDROID>" 
    } 
    ],
     "configuration":
     { 
    "cleanUpCycle":2000, 
    "timeout":30000, 
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", 
    "url":"http://<host_name_appium_server_or_ip-address_appium_server>:<appium_port>/wd/hub",
   "host": <host_name_appium_server_or_ip-address_appium_server>,
   "port": <appium_port>,
   "maxSession": 1,
   "register": true, 
  "registerCycle": 5000,
  "hubPort": <grid_port>,
  "hubHost": "<Grid_host_name_or_grid_ip-address>"
     } }

看看这篇文章http://qaautomationworld.blogspot.in/2014/11/appium-remote-execution-grid-execution.html


1
投票

这可以我们使用TestNg也可以使用多线程实现。

IN selenium Grid需要运行一个Hub和不同节点,但在这种情况下,您可以在不同的2端口运行多个Appium服务器


0
投票

你可以参考这个parallel test with appium & selenium grid

至于在网格中运行Appium,请按照步骤操作

Step1: add the Appium in Environment Vairable 
Step2: Run the Grid for Hub  
Step3: Run the Appium through command prompt using the selective commands 
Step4: Run you java code through Maven command 'mvn'

0
投票

为了通过Appium实现并行测试,我使用了Selenium Grid和TestNG以及Appium。

脚步:

  1. 启动Selenium Server。 (这将是Selenium Grid的中心)
  2. 在默认端口启动Appium Server(这将是appium网格配置的集线器)
  3. 现在,在不同的端口上,使用TestNG.xml / Properties文件中定义的匹配功能初始化节点(Node1,Node2)。 (两个节点配置必须在单独的json.cfg文件中定义)
  4. 在testNG.xml中添加一个参数parallel =“tests”。

确保已连接具有匹配功能的设备/仿真器。

© www.soinside.com 2019 - 2024. All rights reserved.