I don't know. How would you do it with JUnit's command-line? Sorry, I didn't really answer your original question - doh!
I'm pretty sure there is no way to execute only a single test method with Ant's JUnit integration. Its really up to the TestCase to define the 'suite' to run, unless it has some hooks to allow a method name passed in to it, but even then Ant's <junit> wouldn't take advantage of it. If you can do it from the command-line you could always run it with <java> for the time being and send that back as a reply to this thread so that it could possibly be integrated with the <junit> task somehow. Erik ----- Original Message ----- From: "Eddie Espino" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 22, 2001 7:12 PM Subject: RE: Junit Options ... question Thanks for the pointer Erik. How would one execute a single Method (Test Unit) on the command-line as part of an Ant invocation? -=eddie -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 4:10 PM To: [EMAIL PROTECTED] 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/classes.zip" /> <classpath refid="tests-classpath"/> <formatter type="plain" usefile="false" /> <test name="${testcase}" /> </junit> </target> 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)" <[EMAIL PROTECTED]> 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. Regards, -=eddie _____ 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 www.Tascola.com <http://www.tascola.com/>