首页 文章

如何在appium测试中使用序列在2个设备上运行测试用例

提问于
浏览
1

任何人都有测试应用聊天的经验 . 喜欢:accountA向accountB发送消息 . 因此iam通过以下步骤自动化此流程:

1.在设备1中打开应用程序并将消息发送到其他帐户 .

2.在设备2中打开应用程序并验证成功接收消息 .

我尝试在appium中运行,但测试用例仅在1个设备中运行 . 我们希望第一步在设备1上运行,第二步在设备2上运行 .

enter image description here

以下是我在2台设备上打开应用程序的代码 .

enter image description here

有人知道这个卡住了吗?或此自动化类型的任何解决方案 .

2 回答

  • 0

    使用Appium Grid(Selenium Grid 2 appium服务器)并为每个驱动程序创建两个设备驱动程序 .

    关注appium grid的这个链接

    http://appium.readthedocs.io/en/stable/en/advanced-concepts/grid/

  • 0

    这可以在没有Selenium Grid的情况下完成 . The most important thing is to make sure that you provide different values for Selenium Port, Bootstrap Port and device UDIDs.

    您的代码使用deviceName作为属性,当您想要在多个设备上运行脚本时,这将不起作用 .

    检查以下链接以获取详细步骤和DesiredCapabilities代码(最后的代码用于并行执行,但您也可以将其更改为顺序执行)

    http://www.automationtestinghub.com/appium-parallel-execution/

相关问题