slachiewicz opened a new issue, #3566:
URL: https://github.com/apache/maven-surefire/issues/3566
### Affected version
3.6.0, 3.6.1
### Bug description
Since 3.6.0, a project whose tests are plain classes with `test*` methods
and no test framework on the classpath (POJO tests) builds successfully without
running them. Surefire prints neither `Tests run:` nor `No tests to run.`, so
the build log does not show that tests were skipped.
Support for POJO tests was removed on purpose (#3187, done in #3179), but
the 3.6.0 release notes list only #3179, whose title does not mention POJO
tests. A project that upgrades loses its tests without a warning.
To reproduce with Maven 3.10.0, run `mvn test` on a project with only this
test class and maven-surefire-plugin set to each version:
```java
package demo;
public class CalculatorTest {
public void testAdd() {
assert 1 + 1 == 3 : "1 + 1 should be 2";
}
}
```
* 3.5.4: `Using auto detected provider
org.apache.maven.surefire.junit.JUnit3Provider`, `Tests run: 1, Failures: 1`,
BUILD FAILURE.
* 3.6.1: BUILD SUCCESS, with no test output at all.
Expected: when the test source directory has classes that match the includes
but no provider can run them, Surefire says so, for example with a warning that
POJO tests are no longer supported and a pointer to JUnit or TestNG. It would
also help to name the removal in the 3.6.0 release notes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]