Search code examples
unit-testingintellij-ideagointellij-plugin

how to run one or group of tests repeatedly in Go Test IntelliJ


From time to time I have this annoying tests with intermittent issues, that I need to run many times to expose. I was looking for a convenient way to set a number or "endless loop" from the intelliJ, but I did not find.

Is there a plugin or I missed something that could allow me to do this from the UI (instead of changing code for it).

EDIT: As I found the support for such feature is per test utility plugin. For example, it already exists for JUnit, but there is no such for Go Test. My instinct suggests that such functionality should be generically provided for all test plugins, but there might be some technical reasons for per plugin approach.


Solution

  • In the Run Configuration of the test there is a "Repeat:" dropdown where you can specify the number of repeats, for example until the test fails. I believe this is available since IntelliJ IDEA 15.