Setting up ASUnit for AS2 on Windows
(I’m currently working on a project porting AS1.0 to AS2.0, nary a sign of AS3.0. I assume there are other AS2-ers out there who need information about unit-testing and test-driven development, so here it is.)
MXP ROUTE:
1. grab the MXP from asunit.org.
2. if you haven’t got it, install the Adobe Extension Manager.
3. close Flash, and install the MXP, using the Extension Manager.
4. open Flash, go to window>other panels, and you should see “ASUnit Ui” at the bottom of the list, click on it.
5. that brings up the test results panel in the IDE.
FRAMEWORK ROUTE:
1. grab the framework archive from asunit.org, and unzip it somewhere on your hard drive
3. Open the Flash IDE, then edit>preferences>actionscript>actionscript2 settings, and put the path to the asunit directory in there.
Note that there are 3 versions of asunit in the framework folder, and for my purposes you want to put the path to asunit2.
4. copy “ASUnit Ui.swf” from the framework’s asunit2 folder across to “C:\Documents and Settings\
5. open Flash, go to window>other panels, and click on “ASUnit Ui” to bring up the test results panel.
ECLIPSE & FDT PLUGIN ROUTE:
1. follow FRAMEWORK ROUTE parts 1 & 4
2. open your project in Eclipse, right click on it and select properties
3. select “FDT source folder”
4. select “add linked libraries”
5. select “add”
6. select “new”
7. put “ASUNIT2″ as the name, and the path to the asunit2 directory inside the framework as the folder location.
8. click OK
9. highlight ASUNIT2, and click OK
10. click OK.
11. click OK.
12. To check that this install has worked, click on ASUNIT2 in the project explorer, and it should open to show you the package structure
For what it’s worth, I code in Eclipse, so I’ve gone down route 3.