AS3Unit is a unit testing framework. It was designed to make the testing process easier and straightforward, differently from other frameworks that require a significant amount of setting up and reconfiguring.

In order to use the framework, all tests must be placed in a convenient folder structure. Every class in folder will be run as test cases, but only methods starting with ‘test’ will be run. The available assert methods are like those in any other unit testing framework. ex: assert, assertFalse, assertEquals, assertSame, assertNotEquals, assertNotSame. There are fail helper methods as well: setUp, tearDown, setUpClass, tearDownClass.


import com.hoten.as3unit.TestCase;

public class TestAsserts extends TestCase {
	public function testCanary():void {

	public function thisIsNotATest():void {
		fail("Expected only methods starting with 'test' to run!");

	public function testAssertEqualsOneAndOnePasses():void {
		assertEquals(1, 1);
Testing . URL.