I have problems with the flakiness of some of my UI tests. I want to be able to run one particular test multiple times in multiple simulators. The idea is to apply this solution for localhost and then for CI servers.
A perfect solution would be if there is any option that I can mark some test in my PR as flaky
and then during xcodebuild test
run them without explicitly specify their name.
I know that there is an option to run tests in parallel but I want to run one test multiple times on copies of a simulator, not distribute tests between them. It should be simpler, I guess.
I found Can I run an XCTest suite multiple times? topic where described is how to use measureBlock
to run continuous tests, but I'm not sure how to specify the number of runs.
My background is C# where I have access just to Repeat(x)
and case Category
which I can specify during a test run. I'm looking for something similar.
Mark test category as Flaky
-> apply attribute Retry(10)
-> use command tool to run all tests with Flaky
category
Looking for some idea what can I do to implement this kind of solution for my iOS tests.