O'Reilly logo

Maven for Eclipse by Sanjay Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running unit tests

Running the unit test in Maven is just specifying the phase test. To execute the unit test we wrote in the preceding section, right-click on the MyDistance project, select Run As, and click on Maven Test. It will run the unit tests against the class and generate the report in the /target/surefire-reports/ folder, as shown in the following screenshot:

Running unit tests

You can see the results of unit test execution in the txt and xml format.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required