【问题标题】:Aws device farm execution with jenkins having parametarization使用具有参数化的 jenkins 执行 Aws 设备场
【发布时间】:2020-07-30 08:08:58
【问题描述】:

我想将环境、设备名称和套件设置为来自 Jenkins 的参数,并且应该在设备场上运行。我已经在 J​​enkins 工作中创建了参数,但它没有接受它。你能帮我理解脚本配置设置部分吗?我正在使用 java TestNG appium 项目 Maven。

【问题讨论】:

    标签: java jenkins testng appium aws-device-farm


    【解决方案1】:

    如果您已创建参数,则可以从脚本中将它们传递到 Device Farm。例如,如果您将ANDROID_DEVICE 配置为设备名称,将ANDROID_SUITE 配置为套件名称,那么在您的管道脚本中您可以像这样配置它:

    # Include your parametrized values at the top of the pipeline scrip
    properties([
      parameters([
        string(name: 'ANDROID_DEVICE', defaultValue: 'Google Pixel 4', description: 'Device to test.', )
       ])
    ])
    
    # When making the call to Device Farm from within the script, reference these values
      stages {
        stage('Run Device Farm Test') {
          steps {
              devicefarm (
                devicePoolName: ${params.ANDROID_DEVICE},
                .
                .
                .
                )
    

    如果您需要更多帮助,我建议您阅读 device farm 中的 Jenkins Plugin Docsparametrized values in Jenkins pipelines 上的这篇精彩文章。如果您仍然需要帮助,我建议您转至 AWS Device Farm forums 寻求他们的工程团队的帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-12
      • 2018-04-11
      • 2016-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多