I am trying to run junit tests and got the error “could not find or load main class”. I tried to run the same tests with ant and eclipse. Both work fine. I checked all the dependencies of gradle and they were all listed. I saw all the test source class files being generated in \build\classes\test. Do I need explicitly add my test sources as gradle dependency like ant does? I presumed gradle would take care of it automatically. Am I missing sth obvious here?
Where/when exactly do you get this error? Please provide the full error message, the output of ‘gradle -v’, and the ‘–stacktrace’ output (wrapped in HTML code tags).
Sorry for my late reply. It turns about to be our environment issue. Thanks for your quick reply.
What was the environment issue as I’m having the same problem