2016-11-18 14 views
0

現在、私はjenkinsを使用してプロジェクトコードを配備しようとしています。 このプロジェクトでは、Junitを使用してTDDアプローチを実現しています。jenkinsのAnt-Junit統合エラー

最後にジェンキンズで、3つのエラーが原因でビルドに失敗しました。

junit-antとの統合で第1のエラーが発生しました。この目的でfoundation.xmlファイルをmaven-structure xmlファイルとともに使用しています。このmaven-structure xmlファイルはant build.xmlでインポートしています。 (:ジェンキンスコンソールでエラーテスト失敗):この統合のための私のコードは、エラーが1行目でのみを示す

<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である**

パラメータ名「include.pmf.tests」行

**

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

と最後の行の実行中に次のエラーが発生しerroris:モジュールのいずれかを構築しながら(SDK)のbuild.xmlも を

<build dir="business-domain"/> 

ビルドが成功した後、私は様々なテストスーツのためにJunit-reportを生成したいと考えています。ジュニットのテストレポートXMLは、各モジュールごとに生成されています。

答えて

0

は、問題の原因次のコード

<junitreport todir="${build.testoutput}/test"> 
        <fileset dir="${build.testoutput}"> 
         <include name="TEST-*.xml"/> 
      </fileset> 
        <report todir="${build.testoutput}/test/reports"/> 
     </junitreport> 

を忘れました。設定エラーが発生しました。