Can I run an XCTest suite multiple times? Can I run an XCTest suite multiple times? xcode xcode

Can I run an XCTest suite multiple times?


For me it works in swift

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


It might help you to use

func testMultiple() {    self.measureBlock() {            ...            XCTAssert(errMessage == nil, "no error expected")            }}

This runs the code inside self.measureBlock() multiple times to measure the average time.

It is work to change the code, but you might want to know the execution time anyways.

This answer might be close enough to what you want and it is easy to do.