2012-04-15 9 views
2

次のように私のテストターゲットに見える:次のようにANTを使用して、jUnit出力をサマリーに縮小する方法は?

<target name="test" depends="compileTest"> 
    <junit haltonfailure="yes"> 
     <classpath> 
      <pathelement location="bin" /> 
      <pathelement location="lib/xstream-1.4.2.jar" /> 
      <pathelement location="lib/jettison-1.2.jar" /> 
     </classpath> 
     <formatter type="plain" usefile="false" /> 

     <batchtest> 
      <fileset dir="${test-src}"> 
       <include name="**/*Test*" /> 
      </fileset> 
     </batchtest> 
    </junit> 
</target> 

、出力が見えます:

test: 
    [junit] Testsuite: app.commons.error.test.ShellErrorMessageTest 
    [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0.006 sec 
    [junit] Testcase: testCreateNormal took 0.003 sec 
    [junit] Testcase: testGetSectionSeparatorLine took 0.001 sec 
    [junit] Testcase: testGetSectionSeparatorLineMultipleSymbols took 0 sec 
    [junit] Testcase: testGetSectionSeparatorLineEmptySymbol took 0 sec 
    [junit] Testcase: testGetSectionSeparatorLineEmptySymbolSpace took 0 sec 
    [junit] Testcase: testGetSectionSeparatorLineNull took 0 sec 

どのように私は、1行のサマリーに、この出力を折りたたむことができますか?

のラインに沿って1つのライン出力を受信するための方法はありは「500回のテストを実施しました。0障害を。0エラー」

答えて

1
あなたはunverbose JUnitの出力を設定することができ

<formatter type="brief" usefile="false"/> 

を追加することにより、 <junit>以内。さらに、それを減らすために

、次のオプションは、私の心に来る:

+0

「簡単なフォーマッタ」であっても、私は多くの出力を見ています – JAM

関連する問題