--tests in a multi-project build does not work

In our multi-project build if I run

./gradlew test --tests de.test.example.TestClass.testMethod

the build is failing on the first test task it hits (that does not have this test class in it) with the message “No tests found for given includes: [de.test.example.TestClass.testMethod]”. If I specify the particular test task that contains that test method though, it works, so the following is working fine if subproject is the one including the particular test:

./gradlew subproject:test --tests de.test.example.TestClass.testMethod

I ran into the same problem. There should be an option that allows not to mark test failed if no tests found.

1 Like