ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lothar Krenzien <lkrenz...@web.de>
Subject Re: running junit from ant
Date Fri, 13 Jan 2006 11:06:50 GMT
Hi  Stefan,

the TestRunner class was just a try because normally I start the TestSuite class generated
by eclipse and then get the gui. I thought that could be the problem. Now I tried to start
the single testcases (that extends TestCase) and get only a ClassNotFoundException). But I
can't believe it because the test target depends on the compile target and I included the
output dir (where the compiler stores the classes) in my classpath. In the debug output I
can see that the classes are really included.

    [junit] Running TestImportAlarm
    [junit] Executing 'C:\Programme\Java\jdk1.5.0_05\jre\bin\java.exe' with arguments:
    [junit] '-classpath'
           ...
                   W:\deployment\web\WEB-INF\classes\sr2\test\imports\TestImportAlarm.class
           ...
    [junit] 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
    [junit] 'TestImportAlarm'
    [junit] 'filtertrace=true'
    [junit] 'haltOnError=true'
    [junit] 'haltOnFailure=true'
    [junit] 'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter'
    [junit] 'showoutput=false'
    [junit] 'formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter,W:\application\webapp\deploy\TEST-TestImportAlarm.txt'
    [junit] 'propsfile=W:\application\webapp\junit931262155.properties'
             ....


'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
'TestImportAlarm'
'filtertrace=true'
'haltOnError=true'
'haltOnFailure=true'
'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter'
'showoutput=false'
'formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter,W:\application\webapp\deploy\TEST-TestImportAlarm.txt'
'propsfile=W:\application\webapp\junit931262155.properties'


But maybe I will try it again when I have some more time. Thanks for all your patience.

Lothar

"Ant Users List" <user@ant.apache.org> schrieb am 13.01.06 05:56:36:
> 
> On Thu, 12 Jan 2006, Lothar Krenzien <lkrenzien@web.de> wrote:
> 
> > -------------------------------------------
> >  Tasks availability
> > -------------------------------------------
> > image : Missing dependency
> > com.sun.media.jai.codec.FileSeekableStream sshexec : Missing
> > dependency com.jcraft.jsch.UserInfo scp : Missing dependency
> > com.jcraft.jsch.UserInfo jdepend : Missing dependency
> > jdepend.xmlui.JDepend
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > 
> > What does it mean ? Do I need some missing libraries ?
> 
> Only if you intend to use one of these tasks.  If so, check the
> library dependencies section in the manual.
> 
> >        <junit haltonerror="true" haltonfailure="true"
> >        printsummary="true"> <classpath refid="class.path" />
> > 
> >          	<formatter type="plain" usefile="true"/> <batchtest
> >          	todir="${bin.dir}" fork="true"> <fileset
> >          	dir="${out.dir}/WEB-INF/classes/sr2/test/">
> >          	<filename name="**/TestRunner"/> </fileset>
> >          	</batchtest>
> >   	   	
> >        </junit> </target>
> > 
> > The class TestRunner start either the SwingGUI or the TextGUI
> 
> Ah, so you are not really using the junit task at all that way.
> 
> <junit> runs tests inside a test runner of its own, not one JUnit's
> runners.  Ant only captures the results of tests run by its own
> TestRunner.  So from Ant's perspective TestRunner is the only test it
> needs to keep track of.
> 
> Stefan
> 
>
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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


Mime
View raw message