<junit printsummary="yes" fork="yes" haltonfailure="no" >
<classpath>
<fileset dir="build/testcases/test/com/company">
<include name="HelloWorldTest.class" />
<!--include name="HelloWorld.class" -->
</fileset>
<pathelement location="D:\tools\junit3.8.1\junit.jar"/>
</classpath>
<formatter type="xml"/>
<!--this specify the output format of junit -->
<test name="HelloWorldTest" todir="tempjunit" />
<!--this will run all testXXX methods of the TestMyCode and generate the output to dir tempjunit , the output file is TEST-TestMyCode .xml -->
</junit>
TO biggie(飞碟) :
我将你写的放到了build.xml中后,<classpath refid="appclasspath"/>这句话系统提示: Reference appclasspath not found.(我把这句注释了)。的却生成了.xml和.html的文件,谢谢。请你给解释一下<classpath refid="appclasspath"/>这句话好么?