I gave a presentation to the Design Patterns User Group tonight and here is a copy of my Handout:
Unit Testing in ActionScript 2.0 using AsUnit
Goals:
My Goals for this presentation are to convince you to:
- Download AsUnit and contribute to it’s development in any capacity (As a User, a Tester, a Developer, Documenter, or especially as an advocate)
- Learn more about Test-Driven Development
- Learn more about Refactoring
- Learn more about Object Oriented Programming
Problem:
The design and development of complex systems invariably results in unexpected, unforeseen problems and issues. These issues will always appear and are invariably discovered through some form of “Testing”. Testing comes in many forms, but I have encountered some combination or subset of the following in each project:
- Developer Testing is when you check your own work as you build it by using the feature being built and seeing it work.
- End User Testing is when your end users (usually pay for) and then discover all of your product failures.
- Acceptance Testing is when someone else checks your work as it’s released according to a script or some well-defined series of steps against documented, expected results.
- Unit Testing is a process by which we (the developers) test each small piece of our software automatically and instantly throughout it’s development.
Relevance:
For those of us that are designing, building or being held responsible for complex software systems, testing in some form is critical. Unit testing is unique because it gives us the following benefits as developers:
- Helps design better systems *now* by forcing you (the developer) to think about your class from the perspective of it’s consumer.
- Essential part of Refactoring (“Changing the Design of Existing Code”).
- The only way to *grow* a complex or large system with confidence.
- Enhances the legibility of self-documenting code.
- Removes massive unwanted trace statement debris that clutter up the output window and usually obscure the currently relevant debugging info.
- Puts zero testing code into the final product which creates a smaller delivered code base.
- Gives us added confidence and pride in our delivered product.
Solution:
There are currently a small handful of Unit Testing Frameworks available for Flash Application development. We’ll be talking about AsUnit because it is arguably the most feature-rich, efficient, xUnit framework available for Macromedia Flash ActionScript 2.0 applications. Especially those that may be deployed to the Flash 6.x runtime environment.
Printed Resources:
- Test-Driven Development: By Example by Kent Beck
- Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
- Refactoring: Improving the Design of Existing Code by Martin Fowler
- Refactoring to Patterns by Joshua Kerievsky
- The Mythical Man-Month: Essays on Software Engineering by Frederick P. Brooks
- Extreme Programming Explained: Embrace Change by Kent Beck
Online Resources:
0 Comments:
Post a Comment
<< Home