使用 test-without-building 时 xcodebuild 会忽略 testPlan

str*_*eem 8 xcode xcodebuild ios xcode14.3

考虑这个示例项目: https: //github.com/stremsdoerfer/TestPlan。这只是一个 Hello World,它有两个测试计划:TestPlanUnit仅运行单元测试和TestPlanUI仅运行 UI 测试。

使用 Xcode 14.3 运行下面的命令,我希望TestPlanUI能够运行,但实际上只是TestPlanUnit默认运行。

xcodebuild -scheme TestPlan -destination 'platform=iOS Simulator,id=<sim_id>' -testPlan TestPlanUI test-without-building
Run Code Online (Sandbox Code Playgroud)

它在 Xcode 14.2 上运行良好。使用test代替test-without-building也可以正常工作。

有什么想法吗?

小智 3

遇到同样的问题并向 Apple 报告了问题。该参数在传递testPlan时似乎被忽略。test-without-building