有没有什么办法像硒电网一样在appium中运行并行测试? 我们如何在appium中设置不同的节点?Appium - 并行执行(Grid)
回答
这个我们可以用TestNg做也可以用多线程来实现。
硒电网需要运行一个集线器和不同的节点,但是在这种情况下,你在不同的-2端口上运行多个Appium服务器
的问题是,appium是使用iosSimulator或Genymotion VM完全和并不是真的被设计成像这样在一台机器上并行运行。但是,您可以使用自己的appium实例来运行多个虚拟机(我认为这样做会很慢,但在理论上是一种选择),或者使用BrowserStack,Sauce Labs或类似的软件来运行多个测试。
我正在使用Genium的Appium并行运行两个仿真器。这非常容易设置,并且运行多个虚拟机不应该影响appium功能,可能会降低系统速度。与Genymotion相比,酱汁实验室和浏览器堆栈也非常慢。 – Vinay
是的,我们可以像使用GRID概念的Selenium一样实现并行执行。
u需要通过将以下内容乌尔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
您是否使用junit或testng或黄瓜并行执行测试? – vikramvi
你可以参考这个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'
为了实现e并行通过Appium进行测试,我已经使用Selenium Grid和TestNG以及Appium。
步骤:
- 启动Selenium服务器。 (这将是枢纽硒网格)
- 开始Appium缺省端口服务器(这将是枢纽appium网格配置)
- 现在在不同的端口,初始化与匹配功能的节点(节点1,节点2)如TestNG.xml/Properties文件中定义的那样。 (两个节点配置必须在单独的json.cfg文件中定义)
- 在testNG.xml中添加一个参数为parallel =“tests”。
确保连接了具有匹配功能的设备/仿真器。
- 1. 与extjs grid并行执行
- 2. 如何执行Appium android scroll
- 3. 使用appium在多个iOS模拟器上并行执行
- 4. Appium并行执行不同的服务器
- 5. Selenium Grid + TestNG并行运行
- 6. 运行Appium并行 - 多个Chromedrivers
- 7. Selenium GRID测试执行
- 8. 如何使用NUnit3并行测试执行配置Selenium Grid?
- 9. 使用MSTest,C#和Selenium Grid并行执行Selenium测试
- 10. 使用Selenium Grid for Webdriver + TestNG并行执行问题
- 11. C#中的Selenium Grid与Nunit并行执行
- 12. Selenium Grid 2并行测试用例执行
- 13. 如何在Selenium Grid中执行50/50并行测试
- 14. 执行eclipse中的脚本时,Appium检查器屏幕并不平行运行
- 15. 并行执行
- 16. 并行执行
- 17. 无法创建AVD执行appium脚本
- 18. Java命令没有在appium中执行
- 19. Appium詹金斯测试执行冻结
- 20. Selenium Grid自动并行化
- 21. 与Selenium Grid并行运行TestNG套件
- 22. 在appium上使用IOS模拟器并行执行ios测试用例
- 23. 并行执行C#
- 24. TestNG并行执行
- 25. 并行Maven执行
- 26. Cuda并行执行
- 27. Appium - 并行多个Android设备
- 28. 并发执行
- 29. 在Kendo UI Grid Grid上执行自定义算术操作
- 30. 执行并行线程池
这是我在我上一个公司使用的方法...使用几个Appium服务器运行在不同的端口并将其与SeleniumGrid结合使用。它可能在Android上(使用Linux或Unix,就像appium服务器运行的机器一样)。但是iOS仍然无法做到这一点,因为iOS在使用真实设备或模拟器运行自动化测试时仅使用一个实例仪器。 – hayi