What is Apache Maven Surefire?
masterApache Maven Surefire is a test execution framework for Maven. It provides three distinct plugins for different testing stages and reporting needs:
- maven-surefire-plugin: Used to run unit tests during the Maven
testphase. - maven-failsafe-plugin: Used to run integration tests during the
integration-testandverifyphases. - maven-surefire-report-plugin: Used to generate HTML test reports from XML results.
Surefire supports JUnit 4 (4.12+), JUnit 5/6 (Jupiter), and TestNG (6.14.3+). Since version 3.6.0, it uses a single unified provider for all supported testing frameworks.