0

コマンドラインから実行するようにFlexUnitを設定していて、結果をJUnit形式でキャプチャして、Hudsonにプルできるようにします。

私のオプションは何ですか?

4

1 に答える 1

1

ANTを使用してJUnitスタイルのFlexUnitレポートを作成しています。私はこれまでMakeを使用したことがないため、その構文について直接説明することはできません。ただし、それが役立つ場合は、これは私のプロジェクトのANTビルドファイルの制約です。

<target name="test">
        <echo>Executing FlexUnit tests...</echo>

        <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
        <flexunit 
            workingDir="${bin.loc}"
            toDir="${report.loc}" 
            haltonfailure="false" 
            verbose="true" 
            localTrusted="true">

            <source dir="${main.src.loc}" />

            <testSource dir="${test.src.loc}">
                <include name="**/*Test.as" />
            </testSource>

            <library dir="${lib.loc}"/>
       </flexunit>

        <echo>Testing Complete</echo>
        <echo>Generating test reports...</echo>

        <!-- Generate readable JUnit-style reports -->
        <junitreport todir="${report.loc}">
            <fileset dir="${report.loc}">
                <include name="TEST-*.xml" />
            </fileset>

            <report format="frames" todir="${report.loc}/html" />
        </junitreport>

        <copy todir="./test-reports">
            <fileset dir="${report.loc}"/>
        </copy>  

        <echo>Generation complete</echo>
    </target>

ご覧のとおり、flexUnitTasksを使用してテストを実行し、junitreportタスクを使用してレポートを生成しています。

于 2011-03-12T20:21:54.870 に答える