I get into trouble while I try to run my JUnit test through gradle test task. While I run test in eclipse directly with Run As -> JUnit test, everything is ok, test succeeds. But through test task, test always fails. Probably some trouble with encoding of my resource txt file. So I would like to enable debug while I am launching test with gradle
in build.gradle, my test task now looks like:
options.encoding = 'UTF-8'
As explained under
23.12. Test in the Gradle User Guide, executing
gradle test -Dtest.single=MyTestClass -Dtest.debug will suspend the test JVM upon start, and allows to connect an external debugger (such as the Eclipse debugger) on port 5005.