DevOps / Maven Surefire Plugin Interview Questions
How do you exclude tests by category or tag, not file name?
For JUnit 4, define a marker interface annotated with @Category, then reference it via <excludedGroups>. For JUnit 5, use the built-in @Tag annotation with <excludedGroups> directly — no marker interface needed.
This differs from <excludes>, which only matches class/file name patterns rather than annotations inside the code.
More Related questions...