I have multiple source sets that contain separated * unit tests * component tests * integration tests
For regular testing a invocation of gradle test componentTest integrationTest will just execute all of the tests.
For a build pipeline build job individual tests from component tests and integration tests are annotated with a JUnit category annotation @CommitStage. In this situation a gradle invocation gradle componentTest integrationTest now should only select the annotated classes for execution (apply a category filter).
What is the best approach with the least effort. Can I add a JUnit category selector using a system property / gradle property?