Reputation: 13698
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
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
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.
Upvotes: 2