我正在设置FlexUnit 以从命令行运行并希望以 JUnit 格式捕获结果,以便我可以将它们拉入 Hudson。
我有哪些选择?
我正在设置FlexUnit 以从命令行运行并希望以 JUnit 格式捕获结果,以便我可以将它们拉入 Hudson。
我有哪些选择?
我使用 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 任务生成报告。