Hi, It would be good if this patch has the printsummary also enabled as most of us trap the results in a file and parse the results file for further processing. I have placed a sample target which is being used in one of the projects that we are doing.
<target name="ExecuteSuite" depends="CompileSuiteClass"> <xmlproperty file="${xmlfile}" collapseAttributes="true"/> <junit printsummary="yes" fork="true"> <classpath> <pathelement path="${classpath}"/> <pathelement path="${cls.dir}"/> <pathelement path="${suite.dir}"/> </classpath> <test name="suite.${suite.filename}" outfile="TEST-${suite.filename}" todir="${suiteresults.dir}"> <formatter type="xml" extension=".xml"/> </test> </junit> </target> As u said, fork is by default in your patch, but as u see we store the output in a file. Thanks, Dhar -----Original Message----- From: Dharnidhar Vemuri [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 18, 2003 6:13 PM To: 'Ant Developers List' Subject: RE: [PATCH] add support to <junit> for popping up the JUnit GUI Hi, Where is the patch? I have downloaded the latest nightly build today. I did not find this. Can you please help me in locating this file. Thanks, Dhar -----Original Message----- From: Gollapally, Devender [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 7:21 PM To: Ant Developers List Subject: RE: [PATCH] add support to <junit> for popping up the JUnit GUI Awesome !!! I love the green bar -----Original Message----- From: Matt Quail [mailto:[EMAIL PROTECTED] Sent: Saturday, June 14, 2003 6:30 AM To: [EMAIL PROTECTED] Subject: [PATCH] add support to <junit> for popping up the JUnit GUI Hi, This is a patch for the <junit> task, that adds an option to use the traditional JUnit GUI instead of Ant's built-in text/xml/html/etc. formatters. You know, this kind of thing: http://junit.sourceforge.net/doc/testinfected/IMG00001.GIF This is a scratch I've always wanted to itch. The text/html/etc. <junit> output formats are great in continuous-integration situations, but when doing a code/compile/test cycle, I think the "immediate" feedback of the GUI is preferable. You have to love the green-bar :D This patch adds a uimode="true" attribute to <junit> (see the preliminary doco below). I have tested this patch with JDK1.2.2 on Win2k, with JUnit 3.8.1 and 3.0 Patch Contents ============== (see attached patch.txt and patch.tar.gz, created using patch.xml) NOTES: - I've used "@since Ant 1.6FIXME", not sure what the correct value should be Modified files: o JUnitTask.java - added UI mode functionality - "extract method" refactor in executeAsForked() creating executeAsForkedCommon(), so that the setup performed on "cmd" could be reused - Removed some deprecated warnings by using appropriate JDK1.2 methods (this is okay now, right?) - misc whitespace cleaning o JUnitTestRunner.java - an "extract method" refactor so that logic can be re-used - fix illegal javadoc o BaseTest.java o JUnitTest.java o BatchTest.java - move shouldRun() from JUnitTest to superclass BaseTest - added abstract method getTestNames() to BaseTest and implemented in subclasses Added File: o BatchSuite.java - A JUnit test that initializes its suite from a file Preliminary Doco ================ (if the patch is accepted I'll submit a follow-up patch to junit.html) --START DOCS-- Note: UI Mode ------------- When UI mode is activated (using the "uimode" attribute), any associated <formatter> tags are ignored, and one of JUnit's own GUI viewers is used instead. When in UI mode, the following options are ignored: printsummary, fork, halton*, errorproperty, failureproperty, filtertrace, timeout, showoutput, todir, and outfile. All tests will be run in forked mode, irrespective of the value of "fork". If more than one test is run at once (eg, as in a <batchtest> or multiple <test>s) then "includeAntRuntime" will be force to be "true". The <uiarg> nested element can be used when UI mode is active (otherwise it is ignored by <junit>). uimode When set, UI mode is activated as described above. Valid values include "swing", "awt" or the fully-qualified classname of a JUnit "runner". When "true", "yes" or "on", then "swing" is used. (In versions of JUnit that don't have the "swing" viewer, then "swing" and "awt" mean the same thing) If "false" or not set (the default), then UI mode is not active. <uiarg> Adds arguments to the of the JUnit's commandline. <uiarg> allows all attributes described in Command-line Arguments. This is useful, for example, to pass "-noloading" to JUnit: <junit uimode="yes"> <uiarg value="-noloading"/> ... </junit> --END DOCS-- Thanks, =Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]