2

私のテストターゲットは次のようになります。

<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 行の要約にまとめるにはどうすればよいですか?

「Ran 500 tests. 0 Failures. 0 Errors」という行に沿って 1 行の出力を受け取る方法はありますか

4

1 に答える 1

1

追加することで、詳細でないjunit-outputを設定できます。

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

<junit>

それをさらに減らすために、次のオプションが頭に浮かびます。

于 2012-04-15T21:06:17.560 に答える