No, it defaults to run build and test through Gradle.
Which also makes sense, as Gradle often knows better, having special needed configuration or whatever.
But at the same time, IntelliJ usually also cares for the test always being rerun using an init script if you "run tests" even if they are delegated to Gradle, because IntelliJ has the opinion, if a user asks to run the tests, they should run and not be skipped.
If you just run an arbitrary Gradle task and debug its execution it is different, then the cache could kick in.
I personally would not recommend disabling the cache for such a reason even if they were up-to-date or cached weven when run through IntelliJ properly. Even if one wonders why no breakpoints are hit an the test finished immediately, that should only happen once with confusion and then it should be clear what happened and why the next time. But if those people really insist, there are multiple possibilities:
• disable caching for test tasks
• disable caching for test tasks when run through IntelliJ
• disable caching for test tasks if some Gradle property is set so that the ones insisting can have the behaviour they want with the flick of a switch
• enable caching and tell people that insist to either disable the caching completely by setting in their Gradle user home, then it is also for all projects they work on, not only a specific one
• or enable caching and tell people to use an init script in their Gradle user home to do whatever they want, like for example disabling caching on test tasks.
• ...