ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacqui Guerrero <jac...@groxis.com>
Subject RE: Junit Output
Date Wed, 25 Jun 2003 00:06:28 GMT
Actually, in playing around with what I had, it was only sending output to
the TEST-...xml file when errors/failures occurred in my test.

Is the Junit task in ant only supposed to generate data in these XML files
when errors/failures occur in the test run?

Thanks,
Jacqui

-----Original Message-----
From: Harkness, David [mailto:DHarkness@sonypictures.com]
Sent: Tuesday, June 24, 2003 5:01 PM
To: Ant Users List; jacqui@groxis.com
Subject: RE: Junit Output


I just got running with Junit, but I haven't tried using the XML
formatter yet. However, I did notice a few things about this that I'd
check out on your end. It could be my misunderstanding, however. Note,
also, that I wasn't able to get fork working, though I only spent a few
minutes looking into it.

1. Is it okay to use two formatters? Will it simply pipe to both?
2. Your output dir is ${testoutput.dir} yet your fileset is specified as
".". I believe that a fileset's base directory is always the same as the
project's. That it appears in the junitreport with a todir argument
shouldn't make a difference.

I suggest reposting your question with the relevant Ant output to make
diagnosing the problem easier for the others.

Good luck!

David Harkness
Sony Pictures Digital Networks

-----Original Message-----
From: Jacqui Guerrero [mailto:jacqui@groxis.com]
Sent: Tuesday, June 24, 2003 9:42 AM
To: Ant Mailing List
Subject: Junit Output


Hi,

I am running junit tests within ant but it seems that no output is
written to the test xml that gets generated for the test cases.  Am I
doing something wrong?  Below is my <junit> task:

<target name="runtests">
    <echo message="Running tests" />
    <junit printsummary="withOutAndErr"
             errorProperty="test.failed"
             failureProperty="test.failed">

        <formatter type="brief" usefile="false" />

        <!-- Start VM arguments -->
        <jvmarg
value="-Dgroxis.grokker.application.dir=d:\Projects\Grokker\exe\basic"/>
        <jvmarg value="-Dgroxis.grokker.common.dir=common"/>
        <jvmarg value="-Dgroxis.grokker.user.dir=c:\Documents and
Settings\jacqui\GrokkerCVS"/>
        <jvmarg value="-Dgroxis.grokker.maps.dir=Maps"/>
        <jvmarg value="-Dgroxis.grokker.settings.dir=Settings"/>
        <jvmarg value="-Dgroxis.grokker.preferences.dir=Preferences"/>
        <jvmarg value="-Dgroxis.grokker.plugins.dir=plugins"/>
        <jvmarg value="-Dgroxis.grokker.document.dir=doc"/>
        <jvmarg value="-Dgroxis.grokker.user.maps.dir=Maps"/>
        <jvmarg value="-Dgroxis.grokker.user.settings.dir=Settings"/>
        <jvmarg
value="-Dgroxis.grokker.user.preferences.dir=Preferences"/>
        <jvmarg value="-Dgroxis.grokker.user.plugins.dir=plugins"/>
        <jvmarg value="-Dgroxis.grokker.startUrl=blank.html"/>
        <jvmarg
value="-Dgroxis.grokker.registrationURL=http://www.groxis.com/cgi-bin/re
gist
er.cgi"/>
        <jvmarg value="-Dgroxis.grokker.resources.dir=resources"/>
        <jvmarg value="-Dgroxis.grokker.jarFile=Grokker.jar"/>
        <jvmarg
value="-Dgroxis.grokker.themes.dir=d:\Projects\Grokker\exe\basic\Themes"
/>
        <jvmarg value="-Dgroxis.grokker.webserver=false"/>
        <!-- End VM arguments -->

        <formatter type="xml"/>
        <test fork="yes" todir="${testoutput.dir}"
name="com.groxis.test.product.grokker.BrowsePanelTest" />
        <test fork="yes" todir="${testoutput.dir}"
name="com.groxis.test.product.grokker.MarkNodeTest" />

        <classpath refid="project.class.path" />
    </junit>

    <junitreport todir="${testoutput.dir}">
        <fileset dir=".">
            <include name="TEST-*.xml" />
        </fileset>
        <report format="frames" todir="${testoutput.dir}/suites"/>
    </junitreport>

    <fail message="Tests failed. Check log and/or reports."
if="test.failed" /> </target>

Thanks,
Jacqui


---------------------------------------------------------------------
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