【问题标题】:Can I use AWS Device Farm with WebdriverIO Mobile testing?我可以将 AWS Device Farm 与 WebdriverIO 移动测试一起使用吗?
【发布时间】:2021-09-10 15:15:32
【问题描述】:

我构建了一个 webdriverIO 框架。我正在尝试设置 webdriverIO 配置文件以连接到 AWS Device Farm,并获取移动设备,然后运行基于 appium 的测试。

也许是这样的?对于 iOS 的配置文件? 但我遇到的问题如下:

  1. 如何指向我已上传到服务器的 IPA 文件?
  2. 如何连接到 AWS Device Farm?
  3. 是否可以假设因为 AWS Device Farm 运行 appium 服务器,所以我应该从 appium 使用支持的功能?
const { join } = require('path');
const { config } = require('./wdio.conf');

config.specs = [
    './tests/specs/**/*.spec.js',
];

config.capabilities = [
    {
        platformName: 'iOS',
        maxInstances: 1,
        'appium:deviceName': 'iPhone 12',
        'appium:platformVersion': '14.4',
        'appium:orientation': 'PORTRAIT',
        'appium:automationName': 'XCUITest',
        'appium:app': 'replace this with your locally built app - full path to app file',
//        'appium:app': join(process.cwd(), './apps/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'),
        'appium:noReset': true,
        'appium:newCommandTimeout': 240,
    },
];

exports.config = config;

【问题讨论】:

    标签: mobile webdriver-io aws-device-farm


    【解决方案1】:

    对于这些问题:

    1. 如何指向我已上传到服务器的 IPA 文件?

    AWS Device Farm 使用服务器端执行平台,您可以在该平台上使用 CreateUpload API(参考 https://docs.aws.amazon.com/devicefarm/latest/APIReference/API_CreateUpload.html)上传您的应用和测试代码。

    1. 如何连接到 AWS Device Farm?

    您没有从本地客户端连接到 AWS Device Farm,而是使用 ScheduleRun API 在 Device Farm 上安排运行(参考 https://docs.aws.amazon.com/devicefarm/latest/APIReference/API_ScheduleRun.html

    1. 是否可以安全地假设,因为 AWS Device Farm 运行 appium 服务器,所以我应该从 appium 使用支持的功能?

    是的,Device Farm 使用位于 localhost:4723 的 Appium 服务器在服务器端平台上执行您的测试

    请参阅此博客文章,了解详细的演练,为您阐明其中的一些内容:https://aws.amazon.com/blogs/mobile/testing-mobile-apps-with-cucumber-and-appium-through-testng-on-aws-device-farm/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-02
      • 1970-01-01
      • 2018-07-25
      • 1970-01-01
      相关资源
      最近更新 更多