Flex Camp Boston 2007: FlexUnit Testing with Cairngorm
Rough draft notes
Thomas Burleson is talking about FlexUnit Testing with Cairngorm
Looking at StormWatch and TestStorm used to test that information.
Showing demonstration of StormWatch. Loading XML data of stock market information.
Unit Testing: Test all the functionality of a single unit.
Continuous Testing: Test all units each cycle (each commit). Locally.
Continuous Integration: Test all units created by other developers.
Test API server exposed, transformations in Flex, business logic, event processing, and model updates. Not testing UI (hard to do).
Custom extensions to FlexUnit and Cairngorm to aid testing. Should be live on Google code early next year. Universal Mind (UM) Cairngorm.
Traditional testing approach requires extracting stuff. Bad because: Tests performed outside MVC, requires many test shells, and boundary conditions are not tested well. Focus on human issue (functional test) versus tool issue (unit test).
Uses parallel but different base package naming com..commands.* versus tests..commands.*. 1-to-1 for package, classes, functions.
UM Cairngorm adds: view responders, command event dispatching, delegate queues, batch events, command logic aggregation, and FlexUnit support.
Different unit testing frameworks include: ASUnit, FlexUnit, dpUInt, and UM Wrappers (builds on FlexUnit).
Cairgorm Explorer is a handy application.
Showing how the unit tests are constructed and run. Importance of testing with events to mimic what the UI is doing as much as possible.
Have Synchronizer that watches for code changes and creates stubs automatically. May not be opened sourced but good to think about the ideas.