Ignore:
Timestamp:
Oct 25, 2010, 8:54:23 PM (14 years ago)
Author:
Rick van der Zwet
Message:

Some basic Testing classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • liacs/TOOS/assignment1/build.xml

    r206 r207  
    66  <property name="classes.dir" value="${build.dir}/classes"/>
    77  <property name="jar.dir" value="${build.dir}/jar"/>
     8  <property name="report.dir"  value="${build.dir}/junitreport"/>
     9
    810  <property name="javac.includeAntRuntime" value="false" />
    911  <property name="main-class" value="nl.rickvanderzwet.toos.assignment1.Census" />
     12
    1013
    1114  <path id="classpath">
    1215    <fileset dir="${lib.dir}" includes="**/*.jar"/>
    1316  </path>
     17  <path id="application" location="${jar.dir}/${ant.project.name}.jar" />
    1418
    1519
     
    4347        <classpath>
    4448          <path refid="classpath" />
    45           <path location="${jar.dir}/${ant.project.name}.jar" />
     49          <path refid="application"/>
    4650        </classpath>
    4751      </java>
    4852  </target>
     53
     54  <target name="junit" depends="jar">
     55    <mkdir dir="${report.dir}" />
     56    <junit printsummary="yes">
     57      <classpath>
     58        <path refid="classpath"/>
     59        <path refid="application"/>
     60      </classpath>
     61     
     62      <formatter type="xml" />
     63
     64      <batchtest fork="yes" todir="${report.dir}">
     65        <fileset dir="${src.dir}" includes="*Test.java"/>
     66      </batchtest>
     67    </junit>
     68  </target>
     69
     70  <target name="junitreport">
     71    <junitreport todir="${report.dir}">
     72      <fileset dir="${report.dir}" includes="TEST-*.xml"/>
     73      <report todir="${report.dir}"/>
     74    </junitreport>
     75  </target>
     76
     77
    4978</project>
Note: See TracChangeset for help on using the changeset viewer.