You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Cabanero <ch...@gmail.com> on 2006/05/03 03:11:11 UTC

How do you run a particular TestCase?

In Maven2, is there a way to run a particular TestCase rather than all of
them when you run "mvn test"?

Like for example, I'd like to run something like:  "mvn test -testcase=
org.somepackage.MyTestCase".  I'm wondering because it would be nice while
I'm doing development I could run a particular TestCase which I'm working on
that I haven't even checked in yet.  I want to avoid running all the tests
every single time as I tweak MyTestCase and the class it unit tests.

Thanks,
Christian

Re: How do you run a particular TestCase?

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/2/06, Christian Cabanero <ch...@gmail.com> wrote:

> In Maven2, is there a way to run a particular TestCase rather than all of
> them when you run "mvn test"?

mvn test -Dtest=ClassName

http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

test (Optional) - Specify this parameter if you want to use the test
pattern matching notation, Ant pattern matching, to select tests to
run. The Ant pattern will be used to create an include pattern
formatted like **/${test}.java When used, the includes and excludes
patterns parameters are ignored

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org