The Gradle Test Runner Tab is Wonky in Continuous Mode
Gradle allows you to run test task in continuous mode by passing it the --continuous argument. This allows test suites to be run automatically when source code changes.
I have IntelliJ configured to delegate build and run actions to Gradle. I've also elected to use the Gradle Test Runner. I've passed -t option as an argument to Gradle, via the run configuration settings, to have it run test tasks in continuous mode.
Unfortunately, the Gradle Test Runner Tab behaves in a completely wonky manner in this mode. The console barely updates. When it does it often doesn't reflect the changes made. And depending on its mood it will choose to scroll to end, or not.
The Green - Red progress bar has a mind of its own. It almost never changes to Green once it has gone Red. Making it a frustratingly useless indicator in this mode.
The Test Results tree view works, but only barely. It won't automatically scroll to end. So once you've run enough tests there's no visual cue as to whether they passed. And even configuration options like "Select First Failed Test" doesn't work at all in this mode.
These problems only happen in continuous mode. If I manually execute the test tasks, it functions perfectly. So, has anybody figured out how to get this thing working properly in continuous mode?
===
IntelliJ IDEA 2017.3.4 (Ultimate Edition)
Please sign in to leave a comment.
Please file an issue at https://youtrack.jetbrains.com/issues/IDEA with the screenshots/screencast of the Gradle runner tab, showing the problem.
Will do.
The workaround seems to be to just use the JUnit Run Configuration instead of the Gradle Run configuration. The user experience is way better and works as expected.
The reason I prefer using Gradle for continuous testing is that you can configure the build to stop immediately a test fails.
In contrast, JUnit will run all tests regardless of their results. There doesn't seem to be a simple flag to stop running the tests if any fails.