bmw0128
bmw0128

Reputation: 13698

Eclipse Juno and install Maven surefire plugin

I'm learning Maven, and I have a sample project with a simple pom. I want too add the surefire plugin so I may run junit tests. I'm assuming that I can somehow add the plugin using Eclipse, or do I need to use the command line?

Upvotes: 1

Views: 8355

Answers (2)

Michael Scheper
Michael Scheper

Reputation: 7038

It seems the answer provided by @Ajay George is best, but if you're missing the pretty JUnit GUI with the red and green bars, refer to this comment by @thSoft:

You can view Surefire's test reports in Eclipse's JUnit view if you open the XML files in target/surefire-reports.

Upvotes: 3

Ajay George
Ajay George

Reputation: 11875

Install m2eclipse which contains the surefire plugin.

The screenshot give below contains the "Run As" -> "Maven Test" option which will invoke the surefire plugin.

Screenshot of m2eclipse Run As option

Upvotes: 2

Related Questions