The Blog

Mar 7, 2009

Flex Camp Miami: Continuous Integration and Flex (Brian LeGros) 

by Maxim Porges @ 9:40 AM | Link | Feedback (0)

Brian LeGros took to the stage with a staggering gait, giving indication that he was clearly three sheets to the wind. After accidentally plugging the monitor output in to his power cord and blowing out the projector, he began presenting his topic to a potted plant adjacent to the stage. After realizing that the plant preferred cowboy coding and had no interest in setting up a continuous integration workflow, Brian screamed something that would make a sailor blush, stumbled back to his seat, and proceeded to pass out - crushing a conference table during his fall.

Just kidding... I've seen this presentation of Brian's several times before in extended form, and his delivery gets consistently better with each iteration. Brian has a passion for organizing software development processes, and it's clearly evident as he goes through the iterative process for getting a continuous integration process in to place. Brian has a low-key approach to the topic, which I think makes the seemingly daunting task of setting up CI far more approachable.

Brian start off talking about what is involved in CI and why you would want to create a repeatable software process, drawing from real-world situations that developers are likely to face. He then covered some sample workflows for build process, source control, and delivery, and gave a detailed overview of scripts he has created in Ant to support automated builds and testing for Flex and AIR applications. Brian also touched on his work on the Fluint project to produce mock stubs for HTTPService and RemoteObject components, which allow easier regression testing when interacting with remote services. Finally, there was a run-through of how to set up a sample Hudson application.

Brian is offering his build scripts from his blog, and I encourage anybody interested in setting up CI for Flex to make use of them. Brian spent a great deal of time smoothing out all the kinks in our build process at Highwinds, and he really did not impress upon the audience how much work he is giving away for free here. After determining that Fluint did not provide full support for Surefire builds, Brian took it upon himself to change the code base, and produced so much useful stuff that he was accepted in to the project as a committer. That's just one example of what he's done for the community, but I can assure you that there were numerous other hurdles that had to be traversed for Flex and CI to co-operate.

We've just recently got the appropriate sysadmin support to get our Hudson server purring along at Highwinds, and we've already started to reap the rewards. I checked in some work on custom aspects we've written for the server tier of the next major release of StrikeTracker, and tests that worked perfectly in my development sandbox began failing when Hudson was running them. It turned out that while Hudson was generating our API documentation, an inconsistency in the latest version of the Cobertura code coverage plugin was causing the build to fail. Since I was only running the test cycle in my local sandbox and not generating all the documentation, I didn't come across this inconsistency in my own testing. Thanks to Hudson finding this issue for us early, I was able to spend an hour diagnosing and fixing the issue now, instead of at the eleventh hour when QA is waiting on a build from us at some point in the future.

We've also been able to see our test coverage and pass/fail progression, since Hudson is tracking our software quality as part of the build process. My boss has been really interested in seeing these statistics, so I'm glad we've finally set up to be able to make them available to him and use them as a barometer for the quality of our apps.

If you are interested in learning more, I suggest you check out the recording of Brian's February 2009 Adogo presentation on Continuous Integration. This is the extended version of his talk at Flex Camp Miami and contains all the same juicy details.

All Flex Camp Miami Roundup Posts
Welcome and Keynote (Greg Wilson, Adobe)
Working with Data in AIR (David Tucker, Universal Mind)
In Search of AOP for AS3 (Maxim Porges, Highwinds)
Merapi or How To Blow Your Mind with AIR (Andrew Powell, Universal Mind)
The Art of Storytelling (Christian Saylor, Universal Mind)
Continuous Integration and Flex (Brian LeGros, Highwinds)
Spring & BlazeDS Integration (Jeremy Grelle, SpringSource)
Mate Flex Framework (Laura Arguello, ASFusion)