开发者

IntelliJ generated ant builds with unit tests?

How can I take an IntelliJ generated ant build and inc开发者_运维知识库orporate my project's unit tests? I would like to incorporate Hudson into my development process.


Edit the build.xml to include the <junit> and <junitreport> tasks.

<target name="junit-test" description="run all junit tests" depends="compile">
    <!-- Debug output
            <property name="test.class.path" refid="test.class.path"/>
            <echo message="${test.class.path}"/>
    -->
    <junit printsummary="yes" haltonfailure="${haltonfailure}">
        <classpath refid="test.class.path"/>
        <formatter type="xml"/>
        <batchtest fork="yes" todir="${junit.out}">
            <fileset dir="${test.src}">
                <include name="**/*Test.java"/>
            </fileset>
        </batchtest>
    </junit>
    <junitreport todir="${junit.out}">
        <fileset dir="${junit.out}">
            <include name="TEST-*.xml"/>
        </fileset>
        <report todir="${junit.out}" format="frames"/>
    </junitreport>
</target>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜