Apache Maven Surefire
Surefire is the test framework behind Maven's test and verify phases. It runs your unit and integration tests, collects the results, and turns them into reports — whether you use JUnit or TestNG.
The project ships three Maven plugins:
- Maven Surefire Plugin — runs your unit tests during the
testphase. - Maven Failsafe Plugin — runs your integration tests during the
integration-testandverifyphases. - Maven Surefire Report Plugin — turns test results into readable HTML reports.
New here? Start with the Surefire Plugin guide, or grab the latest version from the download page.
What's New
3.6.0-M2
New features and enhancements:
- A new extension point runs diagnosis tools (such as a thread dump collector) automatically when a forked JVM times out.
- Random test order is now reproducible — a given seed produces the same class and method ordering across machines.
-DskipTestsno longer skips Failsafe, so unit and integration tests can be controlled independently.- For better performance, Stack traces now use the
StackWalkerAPI on Java 9+.
Bug fixes: see the 3.6.0-M2 milestone for the full list of resolved issues.
3.6.0-M1
The big one: every test framework now runs through a single, unified JUnit Platform provider. JUnit 5 runs natively, and JUnit 4 and TestNG run through it too — giving you more consistent behaviour and far less to configure. JUnit 5 tests can also run in parallel, and the JUnit 5 XML reports are tidier.
If you're upgrading, note that 3.6.0-M1 raises the minimum versions (JUnit 4.12+, TestNG 6.14.3+) and drops the old per-framework providers. The What's New in 3.6.x guide walks you through it, and the 3.6.0-M1 release notes list everything.
3.5.6
- Test reports can now flag flaky tests and include timestamps for test sets and test cases.
- Debugging Failsafe tests with
maven.surefire.debugshows the “Listening for transport dt_socket…” message on time again.
See the 3.5.6 release notes for the full list.

