« FlexUnit + Ant | Main | Cairngorm 2 Security »
June 28, 2006
New FlexUnit Ant Task
Many thanks to Tony Hillerson of EUI for his contribution following my last blog on FlexUnit + Ant. Tony has taken the FlexUnit task and added the following properties:
- haltonfailure - stop the build process if a failure occurs in one of the tests..
- failureproperty - the name of a property to set if there is a failure in one of the tests..
- verbose - print information about the test run.
The following example shows how to use these properties:
<target name="test-flex">
<flexunit
swf="bin/AntTestRunner.swf"
toDir="${flex-reports}"
haltonfailure="false"
verbose="true"
failureproperty="flexunit.failed" />
<junitreport todir="${flex-reports}">
<fileset dir="${flex-reports}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${reports}/flex"/>
</junitreport>
<fail
message="One or more flexunit tests failed. See test reports for details."
if="flexunit.failed" />
</target>
Resources
Posted by at June 28, 2006 01:32 PM
Comments
It looks like property "failureproperty" is not working. When I try to check result's property it is not defined. I don't see any code in sourcecode that is supporting this functionality
Posted by: Michal at August 23, 2006 03:16 PM
Hi Peter,
I've made the following changes to FlexUnitTask to support our build environment a bit better:
1. Fail the build if the FlexUnitTask does not receive a connection from FlexTestRunner within the specified timeout.
2. Fail the build if a test throws an Error (not just if a test fails).
Let me know if you want me to send the patch to you.
Cheers,
Manish
Posted by: Manish Shah at July 3, 2007 01:26 PM
I borrowed some code from Selenium to manage the browser instead of using the flash standalone player. For our environment we have a pair of test suites, one that is pure AS3, and one integration test. For the integration test we needed the browser, so we could test interaction between the swf and the javascript dependancies.
I added ant task properties so the launcher is optional (you can pick browser, which browser executable if you want, or whether you want the standalone player or not).
We should get this thing added as a peripheral project to the google code project so we can have a regular way to contribute to it.
- Joshua
Posted by: Joshua at October 3, 2007 10:24 PM
Hi Peter,
This is a great tool. Could you tell how is the tool licensed? Thanks
Posted by: Zhongyun Sun at February 6, 2008 04:42 PM
