You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/04/05 05:16:24 UTC

[royale-asjs] branch develop updated: Run JS unit tests in release mode. If a release mode test fails, the build will break (as before) but also the same tests are then run in debug mode and if they pass in debug mode, any difference is reported in the console.

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new f0e1813  Run JS unit tests in release mode. If a release mode test fails, the build will break (as before) but also the same tests are then run in debug mode and if they pass in debug mode, any difference is reported in the console.
f0e1813 is described below

commit f0e1813c8dadedd4896be3bba9e501eaa8756b95
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sun Apr 5 17:16:00 2020 +1200

    Run JS unit tests in release mode.
    If a release mode test fails, the build will break (as before) but also the same tests are then run in debug mode and if they pass in debug mode, any difference is reported in the console.
---
 .../js/projects/BasicJS/src/test/royale/build.xml  |  93 +++++++++++++-----
 .../projects/BindingJS/src/test/royale/build.xml   | 105 ++++++++++++++++-----
 .../CollectionsJS/src/test/royale/build.xml        |  93 +++++++++++++-----
 .../js/projects/CoreJS/src/test/royale/build.xml   |  93 +++++++++++++-----
 .../projects/MXRoyaleJS/src/test/royale/build.xml  |  93 +++++++++++++-----
 .../projects/NetworkJS/src/test/royale/build.xml   |  93 +++++++++++++-----
 .../ReflectionJS/src/test/royale/build.xml         |  93 +++++++++++++-----
 .../RoyaleUnitJS/src/test/royale/build.xml         |  93 +++++++++++++-----
 .../js/projects/XMLJS/src/test/royale/build.xml    |  61 ++++++++++--
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 .../royale/FlexUnitRoyaleApplication-config.xml    |   5 +-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  20 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  20 +++-
 .../src/test/royale/FlexUnitRoyaleApplication.mxml |  18 +++-
 19 files changed, 793 insertions(+), 195 deletions(-)

diff --git a/frameworks/js/projects/BasicJS/src/test/royale/build.xml b/frameworks/js/projects/BasicJS/src/test/royale/build.xml
index 52301b2..53db642 100644
--- a/frameworks/js/projects/BasicJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/BasicJS/src/test/royale/build.xml
@@ -142,7 +142,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,29 +165,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/BindingJS/src/test/royale/build.xml b/frameworks/js/projects/BindingJS/src/test/royale/build.xml
index 22221f6..473c8f3 100644
--- a/frameworks/js/projects/BindingJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/BindingJS/src/test/royale/build.xml
@@ -142,7 +142,8 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
+            <!--<arg value="-dump-config=${basedir}/config-dump.xml" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,29 +166,89 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+                <junitreport todir="${report.dir}" if:true="@{is.needed}">
+                    <fileset dir="${report.dir}">
+                        <include name="TEST-*.xml" />
+                    </fileset>
+                    <report format="frames" todir="${report.dir}/js-debug/html" />
+                </junitreport>
+
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+
+
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/CollectionsJS/src/test/royale/build.xml b/frameworks/js/projects/CollectionsJS/src/test/royale/build.xml
index 6248337..c466e53 100644
--- a/frameworks/js/projects/CollectionsJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/CollectionsJS/src/test/royale/build.xml
@@ -142,7 +142,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,29 +165,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/CoreJS/src/test/royale/build.xml b/frameworks/js/projects/CoreJS/src/test/royale/build.xml
index d89bf91..0aa64bf 100644
--- a/frameworks/js/projects/CoreJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/CoreJS/src/test/royale/build.xml
@@ -142,7 +142,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,29 +165,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/MXRoyaleJS/src/test/royale/build.xml b/frameworks/js/projects/MXRoyaleJS/src/test/royale/build.xml
index 923fb36..7701ded 100644
--- a/frameworks/js/projects/MXRoyaleJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/MXRoyaleJS/src/test/royale/build.xml
@@ -145,7 +145,7 @@
             <arg value="-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css" />
             <arg value="-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-swf.swc:defaults.css" />
             <arg value="-compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css" />
-            <arg value="-debug" />
+           <!-- <arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -168,29 +168,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/NetworkJS/src/test/royale/build.xml b/frameworks/js/projects/NetworkJS/src/test/royale/build.xml
index bbd6f73..c545087 100644
--- a/frameworks/js/projects/NetworkJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/NetworkJS/src/test/royale/build.xml
@@ -142,7 +142,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,29 +165,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/ReflectionJS/src/test/royale/build.xml b/frameworks/js/projects/ReflectionJS/src/test/royale/build.xml
index e097755..bed97cb 100644
--- a/frameworks/js/projects/ReflectionJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/ReflectionJS/src/test/royale/build.xml
@@ -142,7 +142,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,29 +165,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml b/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
index 83b49d6..cd4a0b1 100644
--- a/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml
@@ -147,7 +147,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -170,29 +170,78 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
-		<mkdir dir="${report.dir}" />
-		<royaleunit
-            player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
-            command="${royaleunit.browser}"
-		    workingDir="${basedir}"
-		    toDir="${report.dir}"
-			haltonfailure="true"
-			verbose="true"
-			localTrusted="true"
-			timeout="90000" />
-        
-		<!-- Generate readable JUnit-style reports -->
-		<junitreport todir="${report.dir}">
-			<fileset dir="${report.dir}">
-				<include name="TEST-*.xml" />
-			</fileset>
-			<report format="frames" todir="${report.dir}/html" />
-		</junitreport>
-        
+
+        <mkdir dir="${report.dir}" />
+        <royaleunit
+                player="html"
+                swf="${basedir}/target/bin/js-release/index.html"
+                command="${royaleunit.browser}"
+                workingDir="${basedir}"
+                toDir="${report.dir}"
+                haltonfailure="false"
+                failureProperty="releaseBuildFail"
+                verbose="true"
+                localTrusted="true"
+                timeout="90000" />
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+            ${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+            ${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
+        <!-- Generate readable JUnit-style reports -->
+        <junitreport todir="${report.dir}">
+            <fileset dir="${report.dir}">
+                <include name="TEST-*.xml" />
+            </fileset>
+            <report format="frames" todir="${report.dir}/html" />
+        </junitreport>
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/js/projects/XMLJS/src/test/royale/build.xml b/frameworks/js/projects/XMLJS/src/test/royale/build.xml
index 9a067c8..bb64824 100644
--- a/frameworks/js/projects/XMLJS/src/test/royale/build.xml
+++ b/frameworks/js/projects/XMLJS/src/test/royale/build.xml
@@ -142,7 +142,7 @@
             <jvmarg value="-Xnoagent" />
             <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8763,server=y,suspend=y" />
              -->
-            <arg value="-debug" />
+            <!--<arg value="-debug" />-->
             <arg value="-compiler.targets=JSRoyale" />
             <arg value="-js-output=target" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -165,22 +165,67 @@
         <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: &quot;${royaleunit.browser}&quot;. To skip RoyaleUnit tests, use -Dskip-tests." />
     </target>
 
-    <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests">
+    <target name="test" depends="check-royaleunit-browser"
+            if="royaleunit.browser.exists" unless="skip-tests"
+            xmlns:if="ant:if" xmlns:unless="ant:unless">
+
+        <macrodef name="debug.test">
+            <attribute name="is.needed" default="false"/>
+            <sequential>
+                <echo if:true="@{is.needed}">JS-RELEASE TESTS FAILED</echo>
+                <echo if:true="@{is.needed}">Running backup tests in js-debug build, because release build tests failed</echo>
+                <royaleunit if:true="@{is.needed}"
+                            player="html"
+                            swf="${basedir}/target/bin/js-debug/index.html"
+                            command="${royaleunit.browser}"
+                            workingDir="${basedir}"
+                            toDir="${report.dir}"
+                            haltonfailure="false"
+                            failureProperty="debugBuildFail"
+                            verbose="true"
+                            localTrusted="true"
+                            timeout="90000" />
+                <condition if:true="@{is.needed}" property="debugTestResult" value="PASSED" else="FAILED">
+                    <not>
+                        <isset property="debugBuildFail"/>
+                    </not>
+                </condition>
+            </sequential>
+        </macrodef>
+
         <!-- Load the <royaleunit> task. We can't do this at the <project> level -->
         <!-- because targets that run before royaleUnitTasks.jar gets built would fail. -->
         <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>
+
 		<mkdir dir="${report.dir}" />
 		<royaleunit
             player="html"
-            swf="${basedir}/target/bin/js-debug/index.html"
+            swf="${basedir}/target/bin/js-release/index.html"
             command="${royaleunit.browser}"
 		    workingDir="${basedir}"
 		    toDir="${report.dir}"
-			haltonfailure="true"
+			haltonfailure="false"
+            failureProperty="releaseBuildFail"
 			verbose="true"
 			localTrusted="true"
 			timeout="90000" />
-        
+
+        <condition property="releaseTestResult" value="PASSED" else="FAILED">
+            <not>
+                <isset property="releaseBuildFail"/>
+            </not>
+        </condition>
+
+        <!-- the above runs a test in release build. If it fails, try again in debug-build -->
+        <debug.test is.needed="${releaseBuildFail}"/>
+        <!-- if the debug test ran, it will had already set 'debugTestResult', otherwise set it to 'Not tested' below -->
+        <property name="debugTestResult" value="Not tested" />
+
+        <property name="testResult">
+${ant.project.name} RoyaleUnit Release build tests: ${releaseTestResult}
+${ant.project.name} RoyaleUnit Debug build tests: ${debugTestResult}
+        </property>
+
 		<!-- Generate readable JUnit-style reports -->
 		<junitreport todir="${report.dir}">
 			<fileset dir="${report.dir}">
@@ -188,6 +233,10 @@
 			</fileset>
 			<report format="frames" todir="${report.dir}/html" />
 		</junitreport>
-        
+
+        <!-- fail now if release tests are broken (with debug test info as well) -->
+        <fail if="releaseBuildFail" message="Test Failure ${line.separator}RoyaleUnit Release Build Tests must pass: ${line.separator} ${testResult}" />
+        <!-- otherwise just show test result -->
+        <echo>${testResult}</echo>
     </target>
 </project>
diff --git a/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.mxml
index 487d1e7..be9d629 100644
--- a/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -59,7 +71,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(DataGridColumnTester);
             }
diff --git a/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication-config.xml b/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication-config.xml
index e21baec..7a53a4d 100644
--- a/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication-config.xml
+++ b/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication-config.xml
@@ -95,7 +95,7 @@
           <name>Suite</name>
           <name>RunWith</name>
         </keep-as3-metadata>
-    
+
         <locale/>
         
         <library-path/>
@@ -111,5 +111,6 @@
     </compiler>
     
     <target-player>${playerglobal.version}</target-player>
-
+    <js-default-initializers>false</js-default-initializers>
+    <js-dynamic-access-unknown-members>true</js-dynamic-access-unknown-members>
 </royale-config>
diff --git a/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication.mxml
index 1944776..1245dab 100644
--- a/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/Binding/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
 
@@ -58,6 +59,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -68,9 +80,13 @@ limitations under the License.
 
             public function runTests():void
             {
-                _instance = this;
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                _instance = this;
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(BindingTester);
             }
diff --git a/frameworks/projects/Collections/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/Collections/src/test/royale/FlexUnitRoyaleApplication.mxml
index 327e710..a162b30 100644
--- a/frameworks/projects/Collections/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/Collections/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -59,7 +71,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(CollectionsTester);
             }
diff --git a/frameworks/projects/Core/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/Core/src/test/royale/FlexUnitRoyaleApplication.mxml
index 7d13b1a..a736f2b 100644
--- a/frameworks/projects/Core/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/Core/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -59,7 +71,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(CoreTester);
             }
diff --git a/frameworks/projects/MXRoyale/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/MXRoyale/src/test/royale/FlexUnitRoyaleApplication.mxml
index 71176c5..5c939e2 100644
--- a/frameworks/projects/MXRoyale/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/MXRoyale/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -59,7 +71,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(MXRoyaleTester);
             }
diff --git a/frameworks/projects/Network/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/Network/src/test/royale/FlexUnitRoyaleApplication.mxml
index 9bcda91..d18b68a 100644
--- a/frameworks/projects/Network/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/Network/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -59,7 +71,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(NetworkTester);
             }
diff --git a/frameworks/projects/Reflection/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/Reflection/src/test/royale/FlexUnitRoyaleApplication.mxml
index 7b22b19..db4bc73 100644
--- a/frameworks/projects/Reflection/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/Reflection/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -59,7 +71,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(ReflectionTester);
             }
diff --git a/frameworks/projects/RoyaleUnit/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/RoyaleUnit/src/test/royale/FlexUnitRoyaleApplication.mxml
index 9548b23..d6aa8c2 100644
--- a/frameworks/projects/RoyaleUnit/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/RoyaleUnit/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
             import org.apache.royale.test.Runtime;
 
             //account for swf version variance in some test results due to fixed player bugs etc
@@ -48,6 +49,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -55,11 +67,15 @@ limitations under the License.
                 }
                 return '';
             }
-            
+
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(RoyaleUnitSuite);
             }
diff --git a/frameworks/projects/XML/src/test/royale/FlexUnitRoyaleApplication.mxml b/frameworks/projects/XML/src/test/royale/FlexUnitRoyaleApplication.mxml
index ac5b0b1..72fcd14 100644
--- a/frameworks/projects/XML/src/test/royale/FlexUnitRoyaleApplication.mxml
+++ b/frameworks/projects/XML/src/test/royale/FlexUnitRoyaleApplication.mxml
@@ -37,6 +37,7 @@ limitations under the License.
             
             import org.apache.royale.events.Event;
             import org.apache.royale.test.listeners.CIListener;
+            import org.apache.royale.test.listeners.BrowserConsoleListener;
 
             import org.apache.royale.test.Runtime;
 
@@ -49,6 +50,17 @@ limitations under the License.
                 return 0;
             }
 
+            public function runLocal():Boolean{
+                var ret:Boolean = false;
+                COMPILE::JS{
+                    ret = window.location.search.indexOf('local')!= -1;
+                    if (!ret) {
+                        console.log('For javascript you can run this locally with console output for debugging purposes, using "?local" appended to the url.\nIt may not work for all browsers with file:// protocol (works with Chrome), in which case you need a local http server')
+                    }
+                }
+                return ret
+            }
+
             public function getPlayerVersion():String{
                 COMPILE::SWF{
                     import flash.system.Capabilities;
@@ -60,7 +72,11 @@ limitations under the License.
             public function runTests():void
             {
                 Runtime.swfVersion = getSwfVersion();
-                core.addListener(new CIListener());
+                if (runLocal()) {
+                    core.addListener(new BrowserConsoleListener());
+                } else{
+                    core.addListener(new CIListener());
+                }
                 core.addEventListener(Event.COMPLETE, core_completeHandler);
                 core.runClasses(XMLTester);
             }