apache / apache/maven-surefire

[SUREFIRE-2110] behavior changes about failIfNoTests ?

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

Description

**[Simon](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sbernard)** opened **[SUREFIRE-2110](https://issues.apache.org/jira/browse/SUREFIRE-2110?redirect=false)** and commented

This is maybe the expected behavior but I just update the Maven Surefire Plugin from 3.0.0-M5 to 3.0.0-M6 and find this behavior change.

With 3.0.0-M5 when I was using in my project :

```java
mvn  surefire:test '-Dtest=!org.eclipse.leshan.integration.tests.**' -DfailIfNoTests=false -Dskip.yarn 
```

All was good.

And now with same command line with 3.0.0-M6, I get :

```java
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test (default-cli) on project leshan-integration-tests: No tests matching pattern "!org.eclipse.leshan.integration.tests.**" were executed! (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1]
```

Using -Dsurefire.failIfNoSpecifiedTests=false did the job.

But I share this just in case this is an unexpected regression. 🤷

---

**Affects:** 3.0.0-M6

1 votes, 1 watchers

Contributor guide

Open the contributing guide

Research direction

Reproduce the shown mvn surefire:test command with Surefire 3.0.0-M5 and 3.0.0-M6, comparing -DfailIfNoTests=false with -Dsurefire.failIfNoSpecifiedTests=false. Determine whether the M6 behavior is an intended change or a regression; done means the expected behavior and any required correction are established.

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.