 package org.windmill.astest {
   import org.windmill.WMLogger;
   import flash.utils.*;
+  import flash.external.ExternalInterface;
 
   public class ASTest {
     public static var testClassList:Array = [];

        // it contains in the defined order
        var key:String;
        if ('order' in item.instance) {
          WMLogger.log('ordering ...');
          for each (key in item.instance.order) {
            currTestList.push(createTestItem(methods[key], key));
            delete methods[key];

      }
      else {
        var test:Object = ASTest.testList.shift();
        var res:*;
        WMLogger.log('Running ' + test.className + '.' + test.methodName + ' ...');
        try {
          test.instance[test.methodName].call(test.instance);
          res = ExternalInterface.call('wm_asTestResult', {
            className: test.className,
            methodName: test.methodName
          });
          if (!res) {
            WMLogger.log('SUCCESS');
          }
        }
        catch (e:Error) {
          res = ExternalInterface.call('wm_asTestResult', e);
          if (!res) {
            WMLogger.log('FAILURE: ' + e.message);
          }
        }
        setTimeout(function ():void {
          ASTest.runNextTest.call(ASTest);
