[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-user
Subject:    Re: Junitreport fails on my UNIX machine
From:       Erik Price <eprice () ptc ! com>
Date:       2003-04-30 16:16:45
[Download RAW message or body]



Justin Thomas wrote:
> Where do I specify this in ant though?
> 
> junitreport does not seem to take a classpath

Yes, it is a nested element of <junit>.  Here is a sample from my own 
build file, modeled directly after the one in Java Development With Ant:



     <!-- unit-test time
          printsummary   not needed b/c we use brief formatter with
                         usefile off
          haltonfailure  we set a flag instead (otherwise junitreports
                         dont run)
          fork           CaliberRM SDK requires that we fork unit tests
          errorProperty  these props flag fail task (after junitreport)
          failureProperty -->
     <junit printsummary="false"
            haltonfailure="false"
            fork="true"
            errorProperty="test.failed"
            failureProperty="test.failed">
       <classpath refid="test.classpath"/>
       <sysproperty key="log4j.configuration"
                    value="file://${test.log4j.props}"/>
       <sysproperty key="test1.file.path"
                    value="${test.reqreport}"/>
       <!-- output to console -->
       <formatter type="brief" usefile="false"/>
       <!-- output to file -->
       <formatter type="xml"/>
       <!-- this is where we decide which files to junit
            set -Dtestcase=com.ptc.oatmeal.nameOfTestCase (FQN)
            to test a single case -->
       <batchtest todir="${test.data.dir}" unless="testcase">
         <fileset dir="${test.dir}" includes="**/*Test.class"/>
       </batchtest>
       <test name="${testcase}" todir="${test.data.dir}" if="testcase"/>
     </junit>




Erik


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic