AsUnit can help you build automated test fixtures for SWF applications that are built in almost any development environment, and deployed to almost any modern Flash Player. AsUnit is the primary means by which developers can truly implement Test-Driven development practices in ActionScript projects.

Get Started
Get Involved
Learn More
What exactly is AsUnit?

At it's most basic, AsUnit is simply some ActionScript classes that make it easier for you to build and execute automated tests for your applications. This simple, lightweight component is known as the AsUnit framework, and it currently supports ActionScript 2.0 and ActionScript 3.0 development.

The AsUnit framework is deployed along with a variety of additional tools that we believe make adding (and maintaining) features much simpler.

These tools include:

  • XUL UI: This is a complete, (soon-to-be cross-platform) desktop application written entirely in XUL that simplifies the work involved in creating classes, test cases, test suites, and mock objects. The XUL UI includes everything found in the framework package.
  • MXP: This is a self-extracting Macromedia extension that will install AsUnit directly into Flash MX 2004 and/or Flash 8 Authoring. This extension requres the Macromedia Extension Manager.
  • SWF UI: This is a simple SWF file that can be run from anywhere on your system (including the desktop or the browser) to present test results from an ActionScript 2.0 application that has implemented the ActionScript 2.0 AsUnit framework. (You can right-click and save this link to your desktop if you want to run the UI locally)

Who uses it?

Everyone from one-person shops all the way up to companies like Yahoo! are using AsUnit every day. At the time of this writing (March 2006), AsUnit has been downloaded almost 7,000 times.

Do I need anything else?

Yes, you will need:

  • OOP: Basic comprehension of Object-Oriented Programming principles and how they apply to ActionScript (2.0 or 3.0).
  • Some flavor of text editor: Flash MX 2004, Flash 8, Flex Builder, FDT, ASDT, Scite|Flash, VIM, Emacs, TextMate or anything else that lets you edit text files and doesn't make you too angry.
  • An ActionScript Compiler: MTASC, MXMLC, or the Flash IDE of your choosing (2004 or 8.0)
  • AsUnit Framework: If you are compiling with ActionScript 2.0, add the "as2" package to the class path of your compiler, If you are compiling ActionScript 3.0, add the "as3" package to the class path of your compiler.
Get Involved

AsUnit was first released in March of 2004 by Luke Bayes and Ali Mills of Pattern Park. Since then, many people have contributed to the project and you can be one of them.

One of the simplest and most helpful ways you can get involved is by joining our mailing list and asking questions about things that seem unclear. Your questions help us figure out what to focus on next.

If you're interested in contributing some real time to the project, please check out the to-do lists and writeboards at our basecamp site.

Username: anonymous
Password: anonymous

Get More Involved

If you are interested in becoming a more serious contributor, please feel free to start browsing the Subversion repository or checking out the sources directly.

If you're going to pull down the source code, be aware that it's pretty large. You would probably do well to grab only the module or folders that interest you.

  • comm: Communications sources are in here. This web site, our trailer for being Flashforward film festival finalists, T-shirt art, logos, etc...
  • flashui: The files required to build the MXP file for the Flash IDE extension are in here. These files are pretty stale at this point and probably won't build easily without some human intervention. It would be nice if someone could write a shell script that copies requisite framework sources into the MXI's expected directories, builds the MXP and then removes the copied sources?
  • framework: This module should house the absolute minimal files for getting AsUnit to work manually across platforms. This is the tiny foundation upon which all that is AsUnit is built.
  • installers: Right now, the win installer is stored here, but for the time being, Aral is hosting the Mac build.
  • swfui: The source files required for the SWF-based AsUnit Ui that has been so popular with the AS 2.0 crowd.
  • xului: The source and build files associated with the xului. The files required to build the existing XUL UI installer are currently hiding in the xului/exploration package. We still need to clean these up and resolve some issues before publishing out to the actual installers module.

Once you get the appropriate sources down to your disk, please make sure you're up to date with the head revision before you begin making modifications. You can then easily make the changes you want, and when you're done - create a patch file directly from subversion. You can then easily send us your patch file in order to simplify our integration process. If you find yourself sending us patches more than once or twice, we will likely promote you to developer on the project and just get you write access to SVN.

Any contributions will be greatly appreciated!

Contributors

We would like to give the following contributors special recognition for their efforts:

Learn More

Check out the following resources to learn more about AsUnit in particular and unit testing in general.

We recognize that this section is in desparate need of more current content, if you are interested in contributing some instructional material, please contact us to discuss.