I have a bunch of UI tests in the codebase with which I am currently working that are marked as @FlakyTest. Usually the fail on the CI but very rarely they also fail locally.
I am looking for a way to run one single test multiple times in a row to see how often it fails. Ideally it should be an annotation like @Repeat(n times).
Note that the UI tests are testing Composable components so I can't use Espresso.
You can try to use Barista library or use a different test runner. https://github.com/AdevintaSpain/Barista
One of these test runners is Marathon https://github.com/MarathonLabs/marathon