> "It automatically detects and executes all unit tests in the test source set.
It also generates a report once test execution is complete. JUnit and TestNG are both supported."
my tests were not being run. Debug output showed that a Junit scanner
was being run but nothing for TestNG. I added the following to my
subprojects configuration and the tests are now being run:
So my questions are:
Is TestNG support supposed to be enabled out of the box?
Not at the moment. The Java plugin assumes that you want to run junit tests unless you explicitly say otherwise, by calling test.useTestNG(). There's been some discussion on the mailing list about this behaviour, and we'll probably change it so that Gradle will run all junit and testng tests that it finds.
Is the documentation correct?
Sort of. It is a bit unclear about using testng, however.
Is my fix the correct approach to enable TestNG tests?
Adam Murdoch Gradle Developer http://www.gradle.org Co-Founder and VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com