首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >jenkins中的Ant-Junit集成错误

jenkins中的Ant-Junit集成错误
EN

Stack Overflow用户
提问于 2016-11-18 06:35:01
回答 1查看 238关注 0票数 0

目前,我正试图使用jenkins来部署我的项目代码。在这个项目中,我们使用Junit来实现TDD方法。

现在,在jenkins,在最后,我得到了构建失败的错误,因为3个错误。

xml文件中junit-ant集成的第一个错误(我为此目的使用foundation.xml文件以及maven-结构xml文件,这个maven-结构xml文件是在ant build.xml中导入的),下面是我的集成代码,错误只显示在第一行(测试失败: jenkins控制台中的错误):

代码语言:javascript
复制
    <junit printsummary="yes" haltonfailure="${test.haltonfailure}"    haltonerror="${test.haltonerror}" fork="true" forkmode="perBatch" dir="${basedir}">
                <jvmarg value="-Xms256m"/>
                <jvmarg value="-Xmx600m"/>
                <jvmarg value="-XX:MaxPermSize=600m"/>
                <jvmarg value="-XX:+UseConcMarkSweepGC"/>
                <jvmarg value="-XX:+CMSClassUnloadingEnabled"/>
                <sysproperty key="COMPUTERNAME" value="${env.COMPUTERNAME}"/>
                <sysproperty key="messaging.properties" value="${messaging.properties}"/>
                <sysproperty key="log.dir" value="${build.testoutput}"/>
                <sysproperty key="messaging.dir" value="."/>
                <sysproperty key="log4j.debug" value="true"/>
                <sysproperty key="aib.tests.selector.productMetaData" value="${pmf.testSelectorValue}"/>
                <classpath>
                    <path refid="test.execution.classpath"/>
                    <path refid="test.config.path"/>
                </classpath>
                <formatter type="xml"/>
                <batchtest fork="yes" todir="${build.testoutput}">
                    <fileset refid="test.classesToTest.fileset"/>
                </batchtest>
                <batchtest fork="yes" todir="${build.testoutput}" if="test.classesToTestInSeperateJVM.fileset.nonempty">
                    <fileset refid="test.classesToTestInSeperateJVM.fileset"/>
                </batchtest>
            </junit>

第二个错误执行这一行时发生了以下错误:在build.xml **中是

param名称"include.pmf.tests“行

**

代码语言:javascript
复制
<target name="ci-build" description="runs the ci version of the build process">
    <antcall target="base-build">
        <param name="include.pmf.tests" value="true"/>
        <param name="analyse.code" value="false"/>
    </antcall>
</target>

最后一个错误是在执行这一行时发生了以下错误:也是在build.xml中,同时构建一个模块(SDK)

代码语言:javascript
复制
    <build dir="business-domain"/>

在成功构建之后,我想为各种测试服生成Junit报告。Junit测试报告xml现在正在为每个模块生成。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-11-21 10:21:40

忘记了下面的代码

代码语言:javascript
复制
<junitreport todir="${build.testoutput}/test">
                   <fileset dir="${build.testoutput}">
                       <include name="TEST-*.xml"/>
            </fileset>
                   <report todir="${build.testoutput}/test/reports"/>
         </junitreport>

这就导致了这个问题。发布junit报告时出现配置错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40670764

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档