Junit Options ... question

2001-10-22 Thread Eddie Espino



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 
350San Ramon, CA 94583Phone: (925) 244.9893Cell: (925) 
437-3734Fax: (925) 244-6781www.Tascola.com



Re: Junit Options ... question

2001-10-22 Thread Erik Hatcher

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/ 
 





RE: Junit Options ... question

2001-10-22 Thread Eddie Espino

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/ 
 





Re: Junit Options ... question

2001-10-22 Thread Erik Hatcher

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/