apache / apache/maven-surefire

[SUREFIRE-1829] -DexcludeGroups on skipping tagged test methods

Open
#3,025 0 comments 0 reactions 0 assignees View on GitHub
bug priority:minor
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[John Butler](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dancerjohn)** opened **[SUREFIRE-1829](https://issues.apache.org/jira/browse/SUREFIRE-1829?redirect=false)** and commented

I am running failsafe using JUnit 5. I use the excludedGroups option at the command line (in git CI/CD pipeline) and although it skips test classes with the `@Tag` annotation, it does not skip test methods with the `@Tag` annotation. However, if I use `@Category` at the test method level, those are skipped. 

According to the documentation tagged methods should be skipped: "Any methods/classes/etc with one of the groups/categories/tags specified in this list will specifically not be run."

---
No further details from [SUREFIRE-1829](https://issues.apache.org/jira/browse/SUREFIRE-1829?redirect=false)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Failsafe/JUnit 5 case with excludedGroups, comparing a class-level @Tag with a method-level @Tag and the method-level @Category behavior described in the report. Done means methods tagged with an excluded group are skipped, matching the documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.