When I run the junit test class from Eclipse and get the following error, I usually say what the classpath is when I google.
Error: Main class org.eclipse.jdt.internal.junit.runner.Could not find and load RemoteTestRunner
Cause: java.lang.ClassNotFountException: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
I tried various solutions, but it didn't work at all (it seems stupid to spend time at work), so I wondered if I could do remote debugging with the Gradle test.
If you execute it with the "--debug-jvm" option, it will stand by on port 5005, so you can connect by remote debugging from Eclipse.
$ ./gradlew test --tests "*XxxxTest" --info --debug-jvm
I thought it was impossible until now, but Gradle also had an option to enable remote debugging.
Recommended Posts