简体   繁体   English

如何在 azure 管道中运行 iOS 移动应用程序的 XCTest(UI 测试用例)?

[英]How to run XCTest (UI test cases) of iOS mobile application in the azure pipeline?

How to run XCTest (UI test cases) of iOS mobile application in the Azure pipeline?如何在 Azure 管道中运行 iOS 移动应用程序的 XCTest(UI 测试用例)?

Tasks added in pipeline:在管道中添加的任务:

  1. Install certificate安装证书
  2. Install profile安装配置文件
  3. Use Node 13.3.0使用节点 13.3.0
  4. pod install吊舱安装
  5. Xcode-> build action as "build-for-testing" Xcode-> 构建操作为“构建测试”
  6. Test with Visual Studio App Center使用 Visual Studio App Center 进行测试

At this final step "Test with Visual Studio App Center" we get error在最后一步“Test with Visual Studio App Center”中,我们收到错误

Preparing tests... failed.准备测试...失败。

Error: Unable to find test runner app within /Users/runner/runners/2.164.8/work/1/a/DerivedData/Build/Products/Staging-iphoneos [error]Error: /usr/local/bin/appcenter failed with return code: 3错误:无法在 /Users/runner/runners/2.164.8/work/1/a/DerivedData/Build/Products/Staging-iphoneos [错误] 错误:/usr/local/bin/appcenter failed with返回码:3

How to run XCTest (UI test cases) of iOS mobile application in the azure pipeline?如何在 azure 管道中运行 iOS 移动应用程序的 XCTest(UI 测试用例)?

According to the document Using Azure DevOps for UI Testing , you need make sure the Arguments in the Advanced section of the Xcode task , specify a derived data path, typically using -derivedDataPath DerivedData .根据文档Using Azure DevOps for UI Testing ,您需要确保Xcode任务的 Advanced 部分中的 Arguments 指定派生数据路径,通常使用-derivedDataPath DerivedData

Bsides, You will also need an .ipa file for your application.此外,您的应用程序还需要一个.ipa文件。 An you can build the .ipa file in the same Xcode build-for-testing task by checking the Create app package option, or in a separate Xcode build step or in a Bash script step.您可以通过选中 Create app package 选项在同一个 Xcode build-for-testing 任务中构建.ipa文件,或者在单独的 Xcode 构建步骤或 Bash 脚本步骤中。

Hope this helps.希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM