ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <davidjen...@directvinternet.com>
Subject Re: FYI - Code to automatically add Test classes to a TestSuite.
Date Fri, 14 Dec 2001 18:42:47 GMT
Well, I don't know much about it, but here is an example from the jboss
test suite.

  <target name="tests-standard-unit" depends="jars">
    <mkdir dir="${build.reports}"/>
    <mkdir dir="${build.testlog}"/>
    <junit dir="${module.output}"
	   printsummary="${junit.printsummary}" 
	   haltonerror="${junit.haltonerror}" 
	   haltonfailure="${junit.haltonfailure}" 
	   fork="${junit.fork}"
	   timeout="${junit.timeout}"
	   jvm="${junit.jvm}">

      <jvmarg value="${junit.jvm.options}"/>
      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
      <sysproperty key="log4j.properties"
file="${build.resources}/log4j.properties"/>

      <classpath>
        <pathelement location="${build.classes}"/>
        <pathelement location="${build.resources}"/>
        <path refid="javac.classpath"/>
      </classpath>

      <formatter type="${junit.formatter.type}"
		 usefile="${junit.formatter.usefile}"/>

      <batchtest todir="${build.reports}"
		 haltonerror="${junit.batchtest.haltonerror}" 
		 haltonfailure="${junit.batchtest.haltonfailure}" 
		 fork="${junit.batchtest.fork}">

        <fileset dir="${build.classes}">
          <include name="**/*UnitTestCase.class"/>

          <!-- do not include the dyn loading or security tests -->
          <exclude name="**/test/jrmp/test/DynLoadingUnitTestCase.class"/>
          <exclude name="**/test/security/test/*"/>
        </fileset>
      </batchtest>
    </junit>
  </target>

Anyway, the batchtest element seems to accept a fileset where you can
include and exclude whatever you want.  This creates an xml file for each
test (that doesn't timeout or maybe crash really badly), which we then turn
into a nice website using some xslt.


<gripe> Anyone know how to fix this so tests that time out are noticed as
having failed???</gripe>

david jencks


On 2001.12.14 13:15:22 -0500 David Medinets wrote:
> > -----Original Message-----
> > From: David Jencks [mailto:davidjencks@directvinternet.com]
> >
> > What advantage does this offer over using batchtests with wildcards?
> 
> I have no idea. What are batchtests and wildcards? Sometimes it's easier
> me
> to code a solution than to read the documentation <sigh>
> 
> David Medinets, Consultant, http://www.codebits.com
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 

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