Community
Participate
Working Groups
When a test fails during build, no test results are being copied to the output directory and no test reports are being generated. The reason is the attribute "haltonfailure" in the customTargets.xml files which will break the execution of the postBuild task as soon as a single test fails. Since the postBuild target is interrupted immediately, no cleanup is done and the build results are lost. As an alternative, there is an attribute "failureproperty" that sets a property if a test fails. Problem is that properties cannot be shared between targets. We need to either merge test, publish and tidyup into one target or find a way to communicate the test status to the end of postBuild.
Turned out that a property can be accessed from a *dependent* task. Fixed by re-structuring customTargets.xml, including a finish task with a dependency to the runTests task. The finish task fails when the test.failed property has been set by the runTests task.