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

package org.windmill.astest {
  import org.windmill.WMLogger;
  import flash.utils.*;

  public class ASTest {
    public static var testClassList:Array = [];

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