Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly. This article is a quick overview of Continuous Integration summarizing the technique and its current usage. – Martin Fowler
Although there are several unit testing frameworks available for flex applications, with FlexUnit probably beeing the most prominent, running testcases with those frameworks still remains a manual task. Since unit tests are written in actionscript as well they need to be executed within the Flash Player and therefor only give visual feedback whether the tests succeed or fail.
This is not satisfying in automated software testing environments, but due to security restrictions the Flash Player offers limited means to interact with the host system and report the test results. Peter Martin wrote an Ant test runner for FlexUnit that overcomes this limitation. The test results are reported to the test runner over a local network connection, and the test runner outputs them as JUnit reports which can then be postprocessed by the conventional JUnit Ant tasks.
We here at Catalysts use TeamCity for continuous integration and hence are spoiled by the notification and reporting possibilities we know from its built-in JUnit test runner. After some digging in the TeamCity manual we found out that it is easily possible to write a custom test runner that can report results in a way that is understood by TeamCity. Stuffed with this knowledge and one espresso later we had our own patched version of FlexAntTasks that is able to talk to TeamCity. Peter promised to integrate that into his codebase and might provide it with the next release.
In the meanwhile the patched sources and binaries can be downloaded here: