Got it. Thanks.
I have this test project
https://github.com/ae6rt/gradle-test-listener.git
that is producing good results for JUnit test suites, but not so good results for TestNG suites.
JUnit:
$
gradle -q -p a clean test
Test=com.example.TestA/com.example.TestA, tests passed=2, tests failed=0, test skipped=1
Test=com.example.TestB/com.example.TestB, tests passed=1, tests failed=0, test skipped=1
Test=Gradle Worker 1/null, tests passed=1, tests failed=0, test skipped=1
Test=Test Run/null, tests passed=1, tests failed=0, test skipped=1
TestNG:
gradle -q -p b clean test
Test=Gradle test/null, tests passed=3, tests failed=0, test skipped=0
Test=Gradle Worker 1/null, tests passed=3, tests failed=0, test skipped=0
Test=Test Run/null, tests passed=3, tests failed=0, test skipped=0
You can see that the numbers are there for the TestNG results, but the suite and classname in afterSuite() are not available to display which test produced which results.
This makes the custom listener less than useful for a multiproject build where some projects use JUnit and some use TestNG.
As less important point, I also note that the TestNG afterTest() method is not picking up on the disabled test com.example.TestNGA#testA4 and reporting it as ‘skipped’. Perhaps that test does not appear at all in the scanned list of tests?
Any suggestions on how to associate the TestNG actual results with the test class that produced them?
Thanks much.