Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of Maven-Surefire plugin

What is the use of the Maven Surefire Plugin? I can not find a proper example.

like image 416
prasannajit Avatar asked Oct 05 '15 06:10

prasannajit


People also ask

What is Maven surefire report plugin?

The Surefire Report Plugin parses the generated TEST-*. xml files under ${basedir}/target/surefire-reports and renders them using DOXIA, which creates the web interface version of the test results.

What is surefire plugin for TestNG?

The Surefire plugin is designed to execute the unit tests of an application and can generate the reports using HTML format. We can integrate Surefire plugins with the other testing frameworks such as TestNG, Junit, and POJO Tests, etc. It also supports other languages like C#, Ruby, Scala, etc.

What is the difference between Maven surefire and failsafe plugin?

maven-surefire-plugin is designed for running unit tests and if any of the tests fail then it will fail the build immediately. maven-failsafe-plugin is designed for running integration tests, and decouples failing the build if there are test failures from actually running the tests.

How do I run Maven surefire plugin?

The Maven surefire plugin provides a test parameter that we can use to specify test classes or methods we want to execute. If we want to execute a single test class, we can execute the command mvn test -Dtest=”TestClassName”.


1 Answers

Better you start with https://maven.apache.org/surefire/maven-surefire-plugin/

In short link says:

The Surefire Plugin is used during the test phase of the build lifecycle to execute the unit tests of an application. It generates reports in two different file formats Plain text files (.txt) XML files (.xml)

like image 99
Amey Jadiye Avatar answered Oct 15 '22 22:10

Amey Jadiye