Ant exclusion file

I have to write an ant goal for the JUnit report This is an existing application Some test class files are called testsample Java or sampletest java. But some java files don't do anything. JUnit testcases writes headertest Java, which does not extend testcase

How can I filter these calss files?

<junit printsummary="on" fork="off" haltonfailure="false" showoutput="true">
    <classpath>
        <path refid="CLASSPATH_JUNIT"/>             
    </classpath>            
    <batchtest fork="off"  todir="${BUILD_TEST_DIR}">
        <fileset dir="${TEST_CLASSES_DIR}">
            <include name="**/*Test.class" />
            <include name="**/Test*.class" />
        </fileset> 
    </batchtest>
    <formatter type="xml" />
</junit>

Solution

Fileset also has an exclusion

<exclude name="**/DonotincludeThisOne.class" />
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>