tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-tapestry/junit build.xml
Date Tue, 02 Dec 2003 21:52:48 GMT
ehatcher    2003/12/02 13:52:48

  Modified:    junit    build.xml
  Log:
  add target that uses the builtin Ant <junit> task as well as one to generate an HTML
report.  This is a first pass, and not quite as good as it could be.  For one, running TapestrySuite
with <junit> is not optimal... it really should run test cases directly rather than
a suite.
  
  Revision  Changes    Path
  1.32      +33 -2     jakarta-tapestry/junit/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/build.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- build.xml	21 May 2003 23:40:23 -0000	1.31
  +++ build.xml	2 Dec 2003 21:52:48 -0000	1.32
  @@ -71,7 +71,38 @@
   		<sysproperty key="org.apache.tapestry.enable-reset-service" value="true"/>
     	</java>
     </target>
  -  
  +
  +  <target name="junit" depends="compile" description="Run the test suite.">
  +      <junit printsummary="no"
  +          errorProperty="test.failed"
  +          failureProperty="test.failed"
  +          fork="true">
  +          <classpath refid="junit.classpath"/>
  +          <formatter type="xml"/>
  +          <formatter type="brief" usefile="false"/>
  +
  +          <sysproperty key="org.apache.tapestry.enable-reset-service" value="true"/>
  +
  +          <batchtest todir="${classes.dir}" unless="testcase">
  +              <fileset dir="${classes.dir}"
  +                  includes="**/*TapestrySuite.class"
  +              />
  +          </batchtest>
  +
  +      </junit>
  +
  +      <fail if="test.failed">Unit tests failed.</fail>
  +  </target>
  +
  +  <target name="junitreport">
  +      <junitreport todir="${classes.dir}">
  +          <fileset dir="${classes.dir}">
  +              <include name="TEST-*.xml"/>
  +          </fileset>
  +          <report format="frames" todir="${classes.dir}"/>
  +      </junitreport>
  +  </target>
  +
     <target name="gui" depends="compile" description="Run the JUnit GUI.">
     	<java fork="true" classname="junit.swingui.TestRunner">
     		<classpath refid="junit.classpath"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message