2007 Adobe Systems Incorporated. All Rights Reserved. 1 Joe Berkovitz VP Engineering Allurent, Inc. Continuous Integration with Flex, FlexUnit, and Ant
2007 Adobe Systems Incorporated. All Rights Reserved. 2 Is your build process like a Rube Goldberg contraption? Manual Fragile Missing Current Build Process Image Source:
2007 Adobe Systems Incorporated. All Rights Reserved. 3 Goal of this talk is to introduce tools and techniques to create a continuous integration based build process. Centralized Automated Self-Testing Ideal Build Process Image Source:
2007 Adobe Systems Incorporated. All Rights Reserved. 4 Continuous Integration is a software development practice where members of a team integrate their work frequently. Each integration is verified by an automated build and test that detects integration errors as quickly as possible. Continuous Integration Source:
2007 Adobe Systems Incorporated. All Rights Reserved. 5 WatchBuildTestPublish Continuous Integration Cycle Source:
2007 Adobe Systems Incorporated. All Rights Reserved. 6 Build Failure Notification
2007 Adobe Systems Incorporated. All Rights Reserved. 7 Build Log
2007 Adobe Systems Incorporated. All Rights Reserved. 8 Project Dashboard
2007 Adobe Systems Incorporated. All Rights Reserved. 9 Project Distributions
2007 Adobe Systems Incorporated. All Rights Reserved. 10 WatchBuildTestPublish Continuous Integration Cycle
2007 Adobe Systems Incorporated. All Rights Reserved. 11 Build Process Source Code Build File Generated Assets Build Tool
2007 Adobe Systems Incorporated. All Rights Reserved. 12 Project View Project Build File Generated Assets /bin /src Source Code Build Tool /
2007 Adobe Systems Incorporated. All Rights Reserved. 13 Build Automation Tool Widely Used Extensive Documentation Cross Platform Robust XML Based Ant
2007 Adobe Systems Incorporated. All Rights Reserved. 14 Project Tree governed by a set of automated jobs or "targets" Ideally corresponds 1-to-1 with real projects XML defines targets Key Ant Concepts Property Holds a constant textual value or file location Accessed with ${xyz} syntax Environment or custom defined Target Logical chunk of work Can depend on other targets Works like a script Task Individual command Accepts arguments to control behavior Used in targets
2007 Adobe Systems Incorporated. All Rights Reserved. 15 Ant Hello World Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 16 Hello World Build Script
2007 Adobe Systems Incorporated. All Rights Reserved. Hello World Build Script Output Executed build file Name of target being run Task name and output Result of the build Diagnostic information Buildfile: build.xml init: build: [echo] Hello World! Today is September BUILD SUCCESSFUL Total time: 0 seconds 17
2007 Adobe Systems Incorporated. All Rights Reserved. 18 Ant mxmlc Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 19 Compiling an Application
2007 Adobe Systems Incorporated. All Rights Reserved. 20 Keep source and output separated Don’t do work you’ve already done Provide reasonable defaults Centralize behavior Predictability Build Practices
2007 Adobe Systems Incorporated. All Rights Reserved. 21 Build Templates Source Code Build File Generated Assets Build Tool Build Templates User Specific Overrides
2007 Adobe Systems Incorporated. All Rights Reserved. 22 Build Templates Encapsulates Best Practices Handles Flex Applications, Libraries, and Documentation Cross Project Dependencies Multiple Project Builds Antennae
2007 Adobe Systems Incorporated. All Rights Reserved. 23 Antennae Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 24 Antennae Build Script
2007 Adobe Systems Incorporated. All Rights Reserved. 25 Flex Builder can invoke Ant to compile a Flex project Flex Builder can use Ant targets… to do all build work just to do the non-compilation steps Using Ant and Flex Builder together
2007 Adobe Systems Incorporated. All Rights Reserved. 26 WatchBuildTestPublish Continuous Integration Cycle
2007 Adobe Systems Incorporated. All Rights Reserved. 27 Build Verification Supports Flex and ActionScript Asynchronous Testing Facilities Graphical Test Results FlexUnit
2007 Adobe Systems Incorporated. All Rights Reserved. 28 FlexUnit Test Results
2007 Adobe Systems Incorporated. All Rights Reserved. 29 FlexUnit Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 30 FlexUnit Automation Test Suite Generation Test Filtering Actionscript to Java Result Reporting Antennae
2007 Adobe Systems Incorporated. All Rights Reserved. 31 Antennae Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 32 Automated Test Script
2007 Adobe Systems Incorporated. All Rights Reserved. 33 WatchBuildTestPublish Continuous Integration Cycle
2007 Adobe Systems Incorporated. All Rights Reserved. 34 Ant Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 35 Complex Project Demonstration
2007 Adobe Systems Incorporated. All Rights Reserved. 36 Complex Project View SubProject1 Assets /bin /src Source Code assets SubProject2 Assets /bin /src Source Code imports Project Build File /proj2 /proj1 /
2007 Adobe Systems Incorporated. All Rights Reserved. 37 Many small projects keep dependencies under control But… Flex Builder is very slow when building many Library Projects Solution: Create single Flex Builder "super-project" that has multiple source paths in multiple projects. Building Complex Projects with Flex Builder
2007 Adobe Systems Incorporated. All Rights Reserved. 38 WatchBuildTestPublish Continuous Integration Cycle
2007 Adobe Systems Incorporated. All Rights Reserved. 39 Key Concepts Source code repository Clean build machine Runs after every commit Popular platforms CruiseControl Apache Continuum Many others Continuous Integration
2007 Adobe Systems Incorporated. All Rights Reserved. 40 Ant FlexUnit Antennae Continuous Integration Matrix Flex Ant Tasks Resources
2007 Adobe Systems Incorporated. All Rights Reserved. 41 Q & A