【问题标题】:IntelliJ generated ant builds with unit tests?IntelliJ 生成带有单元测试的 ant 构建?
【发布时间】:2011-01-16 03:44:47
【问题描述】:

如何获取 IntelliJ 生成的 ant 构建并合并项目的单元测试?我想将 Hudson 纳入我的开发过程中。

【问题讨论】:

    标签: hudson intellij-idea


    【解决方案1】:

    编辑 build.xml 以包含 <junit><junitreport> 任务。

    <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>
    

    【讨论】:

      猜你喜欢
      • 2013-07-15
      • 1970-01-01
      • 2015-12-05
      • 1970-01-01
      • 1970-01-01
      • 2017-07-07
      • 2018-09-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多