BIT-101 [2003-2017]

Unit Testing in Flash


For the last year and a half, I’ve been concentrating on learning, implementing and improving my development processes and practices. Learning as much as I can about patterns, object oriented design, UML, refactoring, on and on. The one subject I kept procrastinating on was unit testing. Test driven development is such a completely different way of programming, and I was always in the middle of so many things with so many deadlines, there was never the opportunity to just drop everything and implement a whole new methodology in development.

But, a few weeks ago, I did decide to dive into it, installed AsUnit (for the fourth or fifth time), and picked up a copy of Test Driven Development: By Example by Kent Beck.

I’ve been working my way through the book, and applying what I’ve learned to examples, and finally started building a real app that I want to build, using TDD. It’s slowly starting to sink in. The book is great. And like other Java-based books, cross-applying the example code to AS 2 is a breeze.

One thing I found is that while there is a fair amount of data available on JUnit and unit testing in general, there is virtually nothing out there for the average Flash developer who wants to start using unit testing. Even AsUnit, while a great project, has about a page and a half of documentation total. It’s called the “Quickstart Guide”, which led me on a fruitless search for the “Full Guide”.

As I’m spending quite a bit of time on unit testing with AsUnit right now, and learning lots of little tricks and techniques, I’m going to start posting some stuff here, to hopefully help others along who might be having similar problems getting started. Stay tuned…

« Previous Post
Next Post »