开发者

How do you get FlexUnit output in JUnit format?

开发者 https://www.devze.com 2023-02-16 14:37 出处:网络
I am setting up FlexUnit to run from the command开发者_如何学C line and want to capture the results in JUnit format, so that I can pull them into Hudson.

I am setting up FlexUnit to run from the command开发者_如何学C line and want to capture the results in JUnit format, so that I can pull them into Hudson.

What are my options?


I use ANT to produce my JUnit style FlexUnit reports. I haven't worked with Make before, so I can't directly help you with the syntax for that. However, in case it helps, this is strait for my project's ANT build file:

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

As you can see I'm using flexUnitTasks to run the tests and the junitreport task to generate the reports.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号