开发者

A basic question on java/maven/testng

I am using RHEL 5. I want to be able to write a basic Java class, write corresponding test methods using testNG and be able to say something like "mvn install" which will run test cases and install the built jar.

Is there something called maven plugin to support testNG on RHEL? or there is no such thing and above can be achieved by default on linux. ALso h开发者_如何学编程ow?


The usual maven plugin for testing, the maven-surefire-plugin, handles testng as well as junit.


There are a number of plugins for Maven that will auto-run your tests. I would suggest starting with an IDE solution, such as one provided by the Spring STS eclipse-based suite, which has pre-built project templates, including *.pom files already set up.

If you are looking to do more than that "out of the box" functionality, reading through the Maven docs and perhaps a book would probably be a good idea. In general, whenever you have a really powerful and flexible tool like Maven, things can get complicated really fast, so having a solid understanding is critical to be able to use the tool successfully.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜