Thanks for the pointer Erik.  How would one execute a single Method
(Test Unit) on the command-line as part of an Ant invocation?


-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:10 PM
Subject: Re: Junit Options ... question

>From Ant's very own build.xml:

  <target name="run-single-test" if="testcase" depends="compile-tests">

    <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
      <sysproperty key="build.tests" value="${build.tests}"/>
      <classpath location="${java.home}/lib/" />
      <classpath refid="tests-classpath"/>
      <formatter type="plain" usefile="false" />
      <test name="${testcase}" />

And its run like this:

    ant run-single-test -Dtestcase=<fully qualified classname>

----- Original Message ----- 
From: "Eddie Espino" <[EMAIL PROTECTED]>
To: "Ant-User@Jakarta. Apache. Org (E-mail)"
Sent: Monday, October 22, 2001 5:43 PM
Subject: Junit Options ... question

Is it easily to execute a single test within a Testcase from an Ant
file?  I would like to pass in argument specifying the TestCase class
and test method to invoke.  I would rather not have to update an
AllTests suite wrapper.  I can't seem to see how one would set this up.
Any pointers, are greatly appreciated.

Eddie Espino 

Tascola, Inc.
12647 Alcosta Blvd., Suite 350
San Ramon, CA 94583
Phone: (925) 244.9893
Cell: (925) 437-3734
Fax: (925) 244-6781 <> 

Reply via email to