Hi Gradle fans,
I would like to filter tests executed in a multi project build in order to separated unit tests from integration tests. I know I can create another ‘test’ task to achieve this but I don’t want to because it brings additional complexity.
I want to be less intrusive and do the filtering using the command line.
This is unfortunately not working as you can see below (using Gradle 4.10 or snapshot of 5.X)
ghilaima@ghilaima-linux:~/projects/gradle-project(develop)$ ./gradlew test --tests someTest FAILURE: Build failed with an exception. * What went wrong: Problem configuring task :test from command line. > Unknown command-line option '--tests'.
I have open a feature request for this but never got any answer: https://github.com/gradle/gradle/issues/7748
Update: it does work with the test task is defined in allprojects block but not in subprojects block.