I have found this question Can I run an XCTest suite multiple times? Which basically ask how to run XCTestCase suite multiple times. However, I would like to run only one method multiple times. How can I run for instance
final class MyTests: XCTestCase {
var subject: Subject!
override func setUp() {
super.setUp()
self.subject = Subject()
}
func testSujectDoesStuff() async {
subject.stuff()
}
Then, I want to run testSujectDoesStuff
10 times and fail fast. Xcode itself allows you to do this with
However, I would like to do it programatically instead of relying on the IDE.