ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Lawrence Murphy <ga...@canada.com>
Subject Re: tutorials on junitreport?
Date Thu, 17 Jan 2002 16:51:04 GMT
>>>>> "E" == Erik Hatcher <jakarta-ant@ehatchersolutions.com> writes:

    E> Why thank you! :) <junitreport> works fine in Ant 1.4.1 and all
    E> the stuff developed for that article is rolled into 1.4.1
    E> (article was written for 1.3).

Indeed I'll second that opinion, it's an excellent article; I interpreted
the jar file to mean placing the mail, activation and junitmail jar files
under /usr/share/ant/lib ($ANT_HOME/lib) and the XSL under $ANTHOME/etc/xsl

my problem is with the earlier junitreport stage:

    E> Can you give us more details of the problems you're having with
    E> it?

Thanks for the kind offer; this stuff is just too important not to wrap
my head around it and your help is greatly appreciated.

What I get are the ${Reports}/TEST-*.xml files and then the dreaded
message

    [junit] Tests run: 23, Failures: 0, Errors: 0, Time elapsed: 7.16 sec

    BUILD FAILED

    /home/garym/dev/cbc/sports/sportwire/Util/build.xml:96: Could not
    create task of type: junitreport...

I am using xalan-2.2.0-dev.jar and I have target that reads as follows
(line 96 is the start of the junitreport element:

    <target name="test" depends="jar"
        description="Run JUnit tests for current SportWire package">
    <jar jarfile="${Jardir}/test${COMPONENT}.jar"
           basedir="${CLASSES}"/>
    <mkdir dir="${Reports}"/>
    <junit printsummary="yes" haltonfailure="yes">
               <formatter type="xml"/>
           <classpath>
               <pathelement location="${Jardir}/test${COMPONENT}.jar"/>
               <pathelement location="${Jardir}/${COMPONENT}.jar"/>
               <pathelement location="${Foreign}/log4j.jar"/>
               <pathelement location="${Foreign}/commons.jar"/>
               <pathelement location="${Foreign}/junit.jar"/>
               <pathelement location="${Foreign}/xalan.jar"/>
               <pathelement location="${Foreign}/xerces.jar"/>
               <pathelement location="${Foreign}/jdbc7.0-1.2.jar"/>
           </classpath>

           <batchtest fork="yes" todir="${Reports}">
               <fileset dir="${CLASSES}">
                   <include name="**/Test*.class"/>
               </fileset>
           </batchtest>
    </junit>

    <junitreport>
           <mkdir dir="${Reports}"/> <!-- also tried without this line -->
           <fileset dir="${Reports}">
               <include name="TEST-*.xml"/>
           </fileset>
           <report format="noframes" 
                   styledir="${ANT_HOME}/etc/xsl"
                   todir="${TestReport}"/>
    </junitreport>
    </target>

For extra measure, here's some highlights from the -debug -verbose
output, selected by someone who hasn't a clue what they are doing ;)

Detected Java version: 1.3 in: /opt/jdk/jre
Detected OS: Linux
Setting project property: java.fullversion -> J2RE 1.3.0 IBM build cx130-20010925 (JIT
enabled: jitc)
Setting ro project property: ant.version -> Ant version 1.4.1 compiled on November 20 2001
 +User task: junit     org.apache.tools.ant.taskdefs.optional.junit.JUnitTask

this indicates the optional unit is present, but the stderr ends with the
stack trace fragment:

    at org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:153)    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:83)
    at org.apache.tools.ant.Task.perform(Task.java:216)
    at org.apache.tools.ant.Target.execute(Target.java:184)
    at org.apache.tools.ant.Target.performTasks(Target.java:202)
    at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    at org.apache.tools.ant.Main.runBuild(Main.java:454)
    at org.apache.tools.ant.Main.start(Main.java:153)

and my ant-optional-1.4.1.jar does not have any classes with junitreport
in the name ... which leads me to suspect there is something I don't have
or something I need to write -- I am using a binary RPM ant-1.4.1-1 from
ftp://ftp.falsehope.com/home/gomez/ant

-- 
Gary Lawrence Murphy <garym@teledyn.com> TeleDynamics Communications Inc
What happens on Groundhog Day?   http://www.teledyn.com/fun/GroundhogDay
"There are many things which do not concern the process" --- Joan of Arc



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


Mime
View raw message