【问题标题】:How to disable some test case in Test suit XCUI?如何在 Test suit XCUI 中禁用某些测试用例?
【发布时间】:2020-09-01 15:01:21
【问题描述】:

目前我遇到无法禁用某些测试用例 ( XCUI Test ) 的问题。

我已经尝试从模式中禁用大小写,当我从 xcode 测试时它有效,但是当我从脚本运行它时它不起作用。

我的脚本

/usr/bin/xcodebuild test-without-building -derivedDataPath "build" -workspace tako_ios_superapp.xcworkspace -scheme PlatformUITest -configuration Debug -UseModernBuildSystem=NO -destination "platform=iOS Simulator,name=Platform_Regression,OS=13.3" -resultBundlePath Platform '-only-testing:(my_app_target)/MY_Test_suit'

在我运行这个脚本之后,它仍然会运行测试服中的每个测试用例。有人曾经通过脚本禁用或跳过测试用例吗? 附言。我必须使用命令的原因是因为我必须使用 CI,它需要脚本。

My Schema that I disable test case

【问题讨论】:

    标签: ios swift xcuitest uitest


    【解决方案1】:

    从命令行运行时,不使用 Xcode 运行/跳过模式配置。您需要明确列出要测试的内容和要跳过的内容。

    有关更多详细信息和讨论,请参阅How to use xcodebuild with -only-testing and -skip-testing flag?

    【讨论】:

    • 非常感谢,这只是一种方法吗? (我的意思是它必须只修复 CI 配置)
    • 是的,这是唯一的方法。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-24
    相关资源
    最近更新 更多