Fork me on GitHub

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:

New here? Start with the Surefire Plugin guide, or grab the latest version from the download page.

What's New

3.6.0

New features and enhancements:

Bug fixes: see the 3.6.0 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.0 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.debug shows the “Listening for transport dt_socket…” message on time again.

See the 3.5.6 release notes for the full list.