Spring Boot (Gradle-based) project and Run Test configuration
Answered
I have a Spring Boot project (Gradle config) and when I run test using context menu item "Run (class/method)" IDEA creates Gradle configurations instead of JUnit ones. Can I configure it to use JUnit somehow instead?
Another question - from those Gradle-based test results I can not navigate to source code of the tests (for example, when I click on a name of a test that's marked as Fail on Test Results pane, nothing happens (expected is that source code will open in Editor). F4 does not work either
Windows 10 x64, IntelliJ IDEA Ultimate 2019.2, build #IU-192.5728.198
Please sign in to leave a comment.
hmmm, turns out with JUnit run configuration it also does not let you navigate to source code from Test Results anymore. But I am pretty sure there WAS such a functionality, since when is it disabled?
correction: this navigation seems to be not working only for JUnitParams @Parameters annotation annotated methods. For regular @Test-s, seems to be working.
Question however stays - why IDEA creates Gradle-based test run configurations instead of JUnit one's ?
Hello Kirill,
We have similar issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-174866, but for JUnit 4. Could you please attach sample project for investigation?
> why IDEA creates Gradle-based test run configurations instead of JUnit one's ?
By default IDE uses Gradle for build/run/test. You could change it in "Settings/Preferences | Build, Execution, Deployment | Build Tools | Gradle"