79342451

Date: 2025-01-09 11:45:51
Score: 1.5
Natty:
Report link

As per my knowledge, yes you can filter JUnit tests by tags or annotations directly from the Gradle CLI without modifying the build.gradle file.

You need to use the --tests option to specify the test class or method. While for JUnit 5, the --include-tags option should work for filtering by tags.

Lokk at this

gradle test --tests * --include-tags "yourTag"

Always make sure that you are using JUnit 5 and the correct Gradle version that supports this functionality.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ahmed Noor