ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knuplesch, Juergen" <Juergen.Knuple...@icongmbh.de>
Subject AW: AW: How can I figure out what JUnit test case is failing?
Date Fri, 05 Dec 2008 06:33:27 GMT
If you have the plugin you can now run the 
DeleteAddSubscriberTest
Using the plugin. You should open the Eclipse JUNIT view somewhere on your Eclipse IDE: This
is a Eclipse gui for your Tests.
Then you open the 
DeleteAddSubscriberTest.java in the Eclipse Editor.
Then you use the right mousebutton, click, run as, JunitTest, and go...

The Junit view will show you where your test fails.
You can even doubleclick on the stacktrace of the Junit-failure.
You can even debug Unittests using Eclipse (Debug as Junit Test)
But this is rather Eclipse stuff than Ant Stuff...

Greetings

Jürgen

-- 
Jürgen Knuplesch                    

-----Ursprüngliche Nachricht-----
Von: dave.alvarado@remanresource.com [mailto:dave.alvarado@remanresource.com] 
Gesendet: Donnerstag, 4. Dezember 2008 19:25
An: Ant Users List
Betreff: Re: AW: How can I figure out what JUnit test case is failing?

Hi,

I have this plugin -- org.junit4_4.3.1 -- in my C:\Eclipse\plugins directory.

Yes, I am running an Ant build file in Eclipse.  What I would like is for the specific test
case that is failing to be printed to my console.  Right now, I only get this

run-delete-add-test:
    [junit] Running DeleteAddSubscriberTest
    [junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 2.172 sec

Here's the screen shot to put it in context (http://screencast.com/t/jxz3k7f7nc).  But which
test failed, and why?  My question is, is it possible to output that information the console?
 I'm fine writing it to a separate file if that is the only possible solution.

 - Dave



>  -------Original Message-------
>  From: Knuplesch, Juergen <Juergen.Knuplesch@icongmbh.de>
>  Subject: AW: How can I figure out what JUnit test case is failing?
>  Sent: Dec 04 '08 06:51
>  
>  So what do you want to do?
>  
>  1.Run a junittest under Eclipse? (There is a good Junit plugin for 
> Eclipse: Use it!)  2.Run a junit-test under ANT? (e.g. run a bunch of 
> tests in batchmode): Use <junitreport>
>  
>  
>  --
>  Jürgen Knuplesch
>  -----Ursprüngliche Nachricht-----
>  Von: dave.alvarado@remanresource.com 
> [mailto:dave.alvarado@remanresource.com]
>  Gesendet: Mittwoch, 3. Dezember 2008 18:31
>  An: Ant Users List
>  Betreff: How can I figure out what JUnit test case is failing?
>  
>  Hi,
>  
>  I'm using Ant 1.6.5 with Eclipse 3.4 (Win XP), JRE 1.5.  I run a particular JUnit
task that fails, but I can't figure out which test within my JUnit TestCase class is failing.  Here's
my task ...
>  
>    <target name="run-delete-add-test" depends="build-tests">
>    	 <junit dir="${build}" fork="true" haltonfailure="true" printsummary="on" showoutput="true">
>    	    <classpath>
>      	   <path refid="project.class.path"/>
>         	 <pathelement path="${java.class.path}"/>
>         	 <pathelement path="${dist}/cedarpointpooledclient.jar"/>
>         	 <pathelement path="${build}"/>
>    	   </classpath>
>    	   <test name="DeleteAddSubscriberTest" todir="${docs}" outfile="junit.delete.add.result">
>    	 	   <formatter type="xml"/>
>    	   </test>
>    	 </junit>
>    </target>
>  
>  but all that is output to my Eclipse console is
>  
>  run-delete-add-test:
>      [junit] Running DeleteAddSubscriberTest
>      [junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 2.156 
> sec
>  
>  BUILD FAILED
>  C:\Temp\CedarPoint_Service\build-junit-test.xml:105: Test 
> DeleteAddSubscriberTest failed
>  
>  
>  How can I get more detailed information about what is going wrong?  
> There are 8 tests within the DeleteAddSubscriberTest class.  Thanks, - 
> Dave
>  
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
>  
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message