Maven single test

During development, you may run a single test class repeatedly. To run this through Maven, set the test property to a specific test case.

mvn -Dtest=TestCircle test

The value for the test parameter is the name of the test class (without the extension; we’ll strip off the extension if you accidentally provide one).

You may also use patterns to run a number of tests:

mvn -Dtest=TestCi*le test

And you may use multiple names/patterns, separated by commas:

mvn -Dtest=TestSquare,TestCi*le test
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s