TestNG tests that inherit from a base class but do not add new @Test methods are not detected

This is similar to GRADLE-2354, but it happens with Gradle 2.1, TestNG 6.8.8.

I have a Gradle-based project with multiple modules. I am defining a bunch of abstract “base” test classes in one module and extend them in other modules, sometimes with additional modifications, sometimes without.

And actually I am unable to create extend a base class without defining some additional dummy test method, because otherwise this extended test class will not be run at all.

The example project is available at https://github.com/estekhin/sandbox-gradle-testng-inheritance. The module1 defines the base AbstractTest class with a single test method, and module2 depends on tests from the module1 and defines SimpleExtendingTest and ComplexExtendingTest classes that extend AbstractTest .

Run the tests and check the test report for module2 - it contains only two tests for ComplexExtendingTest. The SimpleExtendingTest class was not run, but the expected behavior is that SimpleExtendingTest .test() method should have been run too.

This problem is still present in gradle 2.2.