xyz
xyz

Reputation: 8917

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 how?

Upvotes: 1

Views: 157

Answers (2)

bmargulies
bmargulies

Reputation: 100051

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

Upvotes: 4

cdeszaq
cdeszaq

Reputation: 31280

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.

Upvotes: 0

Related Questions