Open ahoppen opened 1 month ago
Using swift-testing you could do that.
@Test(arguments: 0..<100)
func testMultiple(attempt: Int){
...
}
I was thinking XCTest ;-)
This seems quite niche. Is there any reason you can't wrap the test in a for loop that runs it multiple times.
I could. I just found the Xcode feature to run a test repeatedly useful quite regularly because it also gives you a few things out of the box like logging which iteration it’s currently on.
I've used this a few times in Xcode to diagnose flakey XCTests that have setUp/tearDown
I didn't know this was an option in Xcode.
Sometimes, when debugging a non-deterministic test, it is useful if you can run it multiple times in a row until it fails. It would be great if the Swift Extension offered that ability.