Can I run an XCTest suite multiple times?

前端 未结 6 1717
盖世英雄少女心
盖世英雄少女心 2021-01-12 05:37

Is it possible to have Xcode run your unit tests multiple times?

I had an issue in several unit tests that caused intermittent failures. Now that I think I\

6条回答
  •  醉酒成梦
    2021-01-12 06:25

    Try overriding invoke test: https://developer.apple.com/documentation/xctest/xctestcase/1496282-invoketest?language=objc

    - (void)invokeTest
    {
        for (int i=0; i<100; i++) {
            [super invokeTest];
        }
    }
    

提交回复
热议问题