Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <target name="compile-junit"
  2. depends="compile, prepare-junit">
  3. <echo message="ANT_HOME: ${env.ANT_HOME}"/>
  4. <javac srcdir="${test.dir}"
  5. destdir="${build.test}"
  6. debug="true"
  7. includeantruntime="true"
  8. source="1.6"
  9. target="1.6">
  10. <classpath refid="junit.classpath"/>
  11. </javac>
  12. </target>
  13.  
  14. <target name="test" depends="compile-junit"
  15. description="Run junit test cases">
  16. <junit printsummary="yes"
  17. fork="yes"
  18. haltonfailure="yes"
  19. errorProperty="test.failed"
  20. failureProperty="test.failed">
  21. <assertions><enable/></assertions>
  22. <classpath refid="junit.classpath"/>
  23. <formatter type="plain" usefile="false"/>
  24. <formatter type="xml" usefile="true"/>
  25. <jvmarg value="-Ddebug=true"/>
  26. <batchtest todir="${build.reports}">
  27. <fileset dir="${build.test}"
  28. includes="**/*Test.class"/>
  29. </batchtest>
  30. </junit>
  31. <fail message="Junit tests failed. Check log and/or reports."
  32. if="test.failed"/>
  33. </target>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement