xcode - 我可以多次运行 XCTest 套件吗?

标签 xcode unit-testing testing automated-tests xctest

是否可以让 Xcode 多次运行您的单元测试?

我在几个单元测试中遇到了导致间歇性故障的问题。现在我认为我已经修复了它,我唯一的选择似乎是混搭 + U 直到我有 95% 的把握这个错误是走了。

我知道其他单元测试框架可以很容易地多次运行单个测试、测试用例或测试套件。我们在 XCTest 中有这种奢侈吗?

最佳答案

对我来说,它工作迅速

override func invokeTest() {
    for time in 0...15 {
        print("this test is being invoked: \(time) times")
        super.invokeTest()
    }
}

关于xcode - 我可以多次运行 XCTest 套件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31195465/

相关文章:

php - 在 Symfony 中使用自定义数据库数据设置功能测试

ios - 头文件和plist文件在框架中的作用是什么?

ios - 在 Xcode 上构建并在 Testflight 上测试后,应用程序启动时出现粉红色屏幕和空白屏幕

c# - 是否有一种方法或库会为字符串比较产生冗长且有用的失败断言结果?

unit-testing - 带有继承的单元测试方法 Controller 调用

testing - 负测试用例

测试中的 Spring bean

objective-c - 错误 : writable atomic property cannot pair a synthesized setter/getter with a user defined setter/getter

c++ - 没有嵌入文件的 JUCE 图像按钮

java - 模拟被测试类中使用的不同类?