9 Replies Latest reply on Jan 19, 2010 8:06 PM by legrosb

    Empty Report File

    jonbcampos

      Obviously I'm doing something wrong because I can build my FlexUnit instance in ANT and get the verbose response that shows there were errors or not (I am using a simple test case and the SampleTests provided). Yet when I go to the report response (TESTS-TestSuites.xml) the file is empty:

       

      <?xml version="1.0" encoding="UTF-8" ?>
      <testsuites />

       

      I can run the FlexUnit4SampleCIProject and get the appropriate failures and report file, but not with my file. Any ideas why?

       

      I extended my tests to be more than just one because I saw at one point there was a bug with that.

       

      My ANT segment (my compile is earlier and successful):

       

          <target name="executeTestRunner" description="executes the test runner app">
              <echo>Running Test Runner SWF</echo>
              <flexunit swf="${Test.dir}/${TestRunner.name}.swf"
                  toDir="${Report.dir}"
                  haltonfailure="false"
                  verbose="true"
                  localTrusted="true"/>
              <echo>Ran Test Runner SWF</echo>
             
              <echo>Generate Readable Tests</echo>
              <junitreport todir="${Report.dir}">
                  <fileset dir="${Report.dir}">
                      <include name="Test-*.xml"/>
                  </fileset>
                  <report format="frames" todir="${Report.dir}/html"/>
              </junitreport>
              <echo>Generated Readable Tests</echo>
          </target>

       

      The FlexUnit4SampleCIProject's ANT segment:

       

          <target name="test" depends="compile">
              <!-- Compile TestRunner.mxml as a SWF -->
              <mxmlc file="${test.src.loc}/TestRunner.mxml" output="${bin.loc}/TestRunner.swf">
                  <source-path path-element="${main.src.loc}" />
                  <library-path dir="${lib.loc}" append="true">
                      <include name="*.swc" />
                  </library-path>
                  <compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
                  <compiler.headless-server>true</compiler.headless-server>
              </mxmlc>

       

              <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
              <flexunit swf="bin/TestRunner.swf" toDir="${report.loc}" haltonfailure="false" verbose="true" localTrusted="true" />

       

              <!-- Generate readable JUnit-style reports -->
              <junitreport todir="${report.loc}">
                  <fileset dir="${report.loc}">
                      <include name="TEST-*.xml" />
                  </fileset>
                  <report format="frames" todir="${report.loc}/html" />
              </junitreport>
          </target>

       

      Also, there is an error that the file FlashPlayerTrust is missing, shouldn't the flexUnitTasks.jar build that file if missing? I added it manually and it fixed the problem.

        • 1. Re: Empty Report File
          legrosb Level 3

          @jonbcampos - The problem you're describing with the locaTrust file and the empty TEST-* file sound like bugs from an earlier build.  Are you using FlexUnit 4 RC1?  Could you post the output from your Ant build and your compilation task(s)?  If you could also post the code from your TestRunner as well that'd help too.  Based on what you've posted I don't immediately see anything that's wrong.

           

          -Brian

          • 2. Re: Empty Report File
            jonbcampos Level 1

            I doubled checked and reloaded everything with the RC1. Still an empty file.


            Output from ANT

            executeTestRunner:
                 [echo] Running Test Runner SWF
            [flexunit] Validating task attributes ...
            [flexunit] Generating default values ...
            [flexunit] Using default snapshot file path [C:\workspace\ANTBuildProject\flexUnitReport\snapshot.jpg]
            [flexunit] Using the following settings:
            [flexunit]     haltonfailure: [false]
            [flexunit]     headless: [false]
            [flexunit]     localTrusted: [true]
            [flexunit]     player: [flash]
            [flexunit]     port: [1024]
            [flexunit]     snapshot: [false]
            [flexunit]     snapshotFile: [C:\workspace\ANTBuildProject\flexUnitReport\snapshot.jpg]
            [flexunit]     swf: [C:\workspace\ANTBuildProject\test\ANTBuildUnitTest.swf]
            [flexunit]     timeout: [60000ms]
            [flexunit]     toDir: [C:\workspace\ANTBuildProject\flexUnitReport]
            [flexunit]     verbose: [true]
            [flexunit]     xcommand: [xvfb]
            [flexunit] Setting up server process ...
            [flexunit] Starting server ...
            [flexunit] OS: [Windows]
            [flexunit] Opening server socket on port [1024].
            [flexunit] Waiting for client connection ...
            [flexunit] Launching player:
            [flexunit] Executing 'rundll32' with arguments:
            [flexunit] 'url.dll,FileProtocolHandler'
            [flexunit] 'C:\workspace\ANTBuildProject\test\ANTBuildUnitTest.swf'
            [flexunit] The ' characters around the executable and arguments are
            [flexunit] not part of the command.
            [flexunit] Created local trust file at [C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust\flexUnit.cfg]
            [flexunit] Client connected.
            [flexunit] Setting inbound buffer size to [262144] bytes.
            [flexunit] Receiving data ...
            [flexunit] Sending acknowledgement to player to start sending test data ...
            [flexunit] FlexUnit test testSetNullText in suite tests.unitedmindset.components.SuperLabelTest failed.
            [flexunit] FlexUnit test testSampleError in suite tests.unitedmindset.SampleTest had errors.
            [flexunit] FlexUnit test testSampleFailure in suite tests.unitedmindset.SampleTest failed.
            [flexunit] FlexUnit test testSampleIgnore in suite tests.unitedmindset.SampleTest was ignored.
            [flexunit]
            [flexunit] Stopping server ...
            [flexunit] End of test data reached, sending acknowledgement to player ...
            [flexunit] Closing client connection ...
            [flexunit] Closing server on port [1024] ...
            [flexunit] Analyzing reports ...
            [flexunit]
            [flexunit] Suite: tests.unitedmindset.SampleTest
            [flexunit] Tests run: 3, Failures: 1, Errors: 1, Skipped: 1, Time elapsed: 0 sec
            [flexunit] Suite: tests.unitedmindset.components.SuperLabelTest
            [flexunit] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0 sec
            [flexunit]
            [flexunit] Results :
            [flexunit]
            [flexunit] Tests run: 6, Failures: 2, Errors: 1, Skipped: 1, Time elapsed: 0 sec
                 [echo] Ran Test Runner SWF
                 [echo] Generate Readable Tests
            [junitreport] Processing C:\workspace\ANTBuildProject\flexUnitReport\TESTS-TestSuites.xml to C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\null1877589518
            [junitreport] Loading stylesheet jar:file:/C:/Program%20Files/eclipse/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant-j unit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
            [junitreport] Transform time: 546ms
            [junitreport] Deleting: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\null1877589518
                 [echo] Generated Readable Tests

             

            TestRunner

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application creationComplete="_onCreationComplete(event)"
                layout="absolute"
                xmlns:adobe="http://www.adobe.com/2009/flexUnitUIRunner"
                xmlns:mx="http://www.adobe.com/2006/mxml">
                <mx:Script>
                    <![CDATA[
                        import tests.unitedmindset.SampleTest;
                        import org.flexunit.listeners.CIListener;
                        import tests.unitedmindset.components.ComponentsSuite;
                        import mx.events.FlexEvent;
                        import tests.unitedmindset.components.SuperLabelTest;
                        import org.flexunit.listeners.UIListener;
                        import org.flexunit.runner.FlexUnitCore;
                       
                        private function _onCreationComplete(event:FlexEvent):void
                        {
                            runTests();
                        }
                       
                        public function runTests():void
                        {
                            var core:FlexUnitCore = new FlexUnitCore();
                           
                            /**If you don't need graphical test results, comment out the line below and the MXML declaring
                             the TestRunnerBase. **/
                            core.addListener(new UIListener(uiListener));
                            core.addListener(new CIListener());
                           
                            /**If you would like to see text output in verbose mode, umcomment either of the follow listeners **/
                            //core.addListener( new TraceListener() ); - For AS3 Projects
                            //core.addListener( TextListener.getDefaultTextListener( LogEventLevel.DEBUG ) ); - For Flex Projects
                           
                            core.run(SuperLabelTest, SampleTest);
                        }
                    ]]>
                </mx:Script>
                <adobe:TestRunnerBase id="uiListener"
                    width="100%" height="100%"/>
            </mx:Application>

             

            Let me know if there is anything else I can get for you on this.

            • 3. Re: Empty Report File
              legrosb Level 3

              @jonbcampos - Hmm, the output looks typical of what you should see.  Can you try adding an mm.cfg file to your home directory (C:\Documents and Settings\<user>) and adding the following lines to the file:

               

              ErrorReportingEnable=1 
              TraceOutputFileEnable=1

               

              This should produce a file @  C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs\flashlog.txt with trace and error debug messages in it.  If there is a bug in the tranmission, you should see the transmission results in this log file.  If you run your Abt build with the -v flag, it should also show the messages on Windows I believe.  If you could paste the output from the flashlog.txt file, it may give us more of a clue of what's going on.

               

              Are you able to verify that all tests run correctly in the UIListener?  If you could post the code for the SuperLabelTest as well, I may be able to see anything peculiar causing the problem.  Let me know what you find.

               

              -Brian

              • 4. Re: Empty Report File
                jonbcampos Level 1

                Not a problem, already was generated.

                 

                flashlog.txt

                <testcase classname='tests.unitedmindset.components::SuperLabelTest' name='testSetEmptyText' time='0.000'  status='success'/>
                <testcase classname='tests.unitedmindset.components::SuperLabelTest' name='testSetNullText' time='0.000'  status='failure'><failure message='expected:&lt;Super &gt; but was:&lt;Super null&gt;' type='tests.unitedmindset.components::SuperLabelTest.testSetNullText' ><![CDATA[expected:&lt;Super &gt; but was:&lt;Super null&gt;
                    at org.flexunit::Assert$/failWithUserMessage()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\Fl exUnit4\src\org\flexunit\Assert.as:277]
                    at org.flexunit::Assert$/failNotEquals()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit 4\src\org\flexunit\Assert.as:99]
                    at org.flexunit::Assert$/assertEquals()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4 \src\org\flexunit\Assert.as:90]
                    at tests.unitedmindset.components::SuperLabelTest/testSetNullText()[C:\workspace\ANTBuildUni tTest\src\tests\unitedmindset\components\SuperLabelTest.as:60]
                    at Function/http://adobe.com/AS3/2006/builtin::apply()
                    at flex.lang.reflect::Method/apply()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\sr c\flex\lang\reflect\Method.as:208]
                    at ReflectiveCallable/run()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\fle xunit\runners\model\FrameworkMethod.as:297]
                    at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[E:\hudson\jobs\FlexUn it4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:171]
                    at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[E:\hudson\jobs\FlexU nit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:186]
                    at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\InvokeMethod. as:77]
                    at org.flexunit.internals.runners.statements::StackAndFrameManagement/evaluate()[E:\hudson\j obs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\St ackAndFrameManagement.as:129]
                    at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[E:\hudson\job s\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stat ementSequencer.as:97]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::AsyncStatementBase/sendComplete()[E:\hudson\jo bs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Asy ncStatementBase.as:76]
                    at org.flexunit.internals.runners.statements::StatementSequencer/sendComplete()[E:\hudson\jo bs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Sta tementSequencer.as:165]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:138]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::InvokeMethod/handleMethodExecuteComplete()[E:\ hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\state ments\InvokeMethod.as:89]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[E:\hudson\jobs\FlexUn it4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:173]
                    at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[E:\hudson\jobs\FlexU nit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:186]
                    at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\InvokeMethod. as:77]
                    at org.flexunit.internals.runners.statements::SequencerWithDecoration/executeStep()[E:\hudso n\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements \SequencerWithDecoration.as:104]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]
                    at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:108]
                    at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[E:\hudson\job s\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stat ementSequencer.as:97]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]
                    at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:108]
                    at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()[E:\hudson\jobs\FlexUnit4-Flex3 .4\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:130]
                    at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.runners::BlockFlexUnit4ClassRunner/handleBlockComplete()[E:\hudson\jobs\Flex Unit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:16 7]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::AsyncStatementBase/sendComplete()[E:\hudson\jo bs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Asy ncStatementBase.as:76]
                    at org.flexunit.internals.runners.statements::StatementSequencer/sendComplete()[E:\hudson\jo bs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Sta tementSequencer.as:165]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:138]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::AsyncStatementBase/sendComplete()[E:\hudson\jo bs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Asy ncStatementBase.as:76]
                    at org.flexunit.internals.runners.statements::StatementSequencer/sendComplete()[E:\hudson\jo bs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Sta tementSequencer.as:165]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:138]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::InvokeMethod/handleMethodExecuteComplete()[E:\ hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\state ments\InvokeMethod.as:89]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[E:\hudson\jobs\FlexUn it4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:173]
                    at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[E:\hudson\jobs\FlexU nit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:186]
                    at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\InvokeMethod. as:77]
                    at org.flexunit.internals.runners.statements::SequencerWithDecoration/executeStep()[E:\hudso n\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements \SequencerWithDecoration.as:104]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]
                    at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:108]
                    at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[E:\hudson\job s\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stat ementSequencer.as:97]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::StackAndFrameManagement/handleNextExecuteCompl ete()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runn ers\statements\StackAndFrameManagement.as:151]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.internals.runners.statements::InvokeMethod/handleMethodExecuteComplete()[E:\ hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\state ments\InvokeMethod.as:89]
                    at org.flexunit.token::AsyncTestToken/sendResult()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspac e\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as:118]
                    at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[E:\hudson\jobs\FlexUn it4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:173]
                    at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[E:\hudson\jobs\FlexU nit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:186]
                    at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\InvokeMethod. as:77]
                    at org.flexunit.internals.runners.statements::StackAndFrameManagement/evaluate()[E:\hudson\j obs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\St ackAndFrameManagement.as:129]
                    at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[E:\hudson\job s\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stat ementSequencer.as:97]
                    at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:134]]]></failure></testcase>
                <testcase classname='tests.unitedmindset.components::SuperLabelTest' name='testSetHelloWorldText' time='0.000'  status='success'/>
                <testcase classname='tests.unitedmindset::SampleTest' name='testSampleError' time='0.000'  status='error'><error message='ERROR! - This is an error' type='tests.unitedmindset::SampleTest.testSampleError' ><![CDATA[Error: ERROR! - This is an error
                    at tests.unitedmindset::SampleTest/testSampleError()[C:\workspace\ANTBuildUnitTest\src\tests \unitedmindset\SampleTest.as:18]
                    at Function/http://adobe.com/AS3/2006/builtin::apply()
                    at flex.lang.reflect::Method/apply()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\sr c\flex\lang\reflect\Method.as:208]
                    at ReflectiveCallable/run()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\fle xunit\runners\model\FrameworkMethod.as:297]
                    at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[E:\hudson\jobs\FlexUn it4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:171]
                    at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[E:\hudson\jobs\FlexU nit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:186]
                    at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\InvokeMethod. as:77]
                    at org.flexunit.internals.runners.statements::StackAndFrameManagement/handleTimerComplete()[ E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\st atements\StackAndFrameManagement.as:141]
                    at flash.events::EventDispatcher/dispatchEventFunction()
                    at flash.events::EventDispatcher/dispatchEvent()
                    at flash.utils::Timer/tick()]]></error></testcase>
                <testcase classname='tests.unitedmindset::SampleTest' name='testSampleFailure' time='0.000'  status='failure'><failure message='FAIL! - This is a sample test that will fail.' type='tests.unitedmindset::SampleTest.testSampleFailure' ><![CDATA[FAIL! - This is a sample test that will fail.
                    at org.flexunit::Assert$/fail()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org \flexunit\Assert.as:265]
                    at tests.unitedmindset::SampleTest/testSampleFailure()[C:\workspace\ANTBuildUnitTest\src\tes ts\unitedmindset\SampleTest.as:12]
                    at Function/http://adobe.com/AS3/2006/builtin::apply()
                    at flex.lang.reflect::Method/apply()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\sr c\flex\lang\reflect\Method.as:208]
                    at ReflectiveCallable/run()[E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\fle xunit\runners\model\FrameworkMethod.as:297]
                    at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[E:\hudson\jobs\FlexUn it4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:171]
                    at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[E:\hudson\jobs\FlexU nit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:186]
                    at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[E:\hudson\jobs\FlexUni t4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\InvokeMethod. as:77]
                    at org.flexunit.internals.runners.statements::StackAndFrameManagement/handleTimerComplete()[ E:\hudson\jobs\FlexUnit4-Flex3.4\workspace\FlexUnit4\src\org\flexunit\internals\runners\st atements\StackAndFrameManagement.as:141]
                    at flash.events::EventDispatcher/dispatchEventFunction()
                    at flash.events::EventDispatcher/dispatchEvent()
                    at flash.utils::Timer/tick()]]></failure></testcase>
                <testcase classname='tests.unitedmindset::SampleTest' name='testSampleIgnore' time='0.000' status='ignore'><skipped /></testcase>
                <endOfTestRun/>

                 

                SuperLabelTest.as (runs as intended in UIListener)

                this meant to be a simple test class, nothing real or production level

                 

                package tests.unitedmindset.components
                {
                    import com.unitedmindset.components.SuperLabel;
                   
                    import org.flexunit.Assert;
                   
                    public class SuperLabelTest
                    {
                        public function SuperLabelTest()
                        {
                        }
                       
                        //-----------------------------
                        // Private Vars
                        //-----------------------------
                        private var superLabel:SuperLabel;
                       
                        //-----------------------------
                        // Setup
                        //-----------------------------
                        [BeforeClass]
                        public static function runBeforeClass():void
                        {
                            //do nothing
                        }
                       
                        [AfterClass]
                        public static function runAfterClass():void
                        {
                            //do nothing
                        }
                       
                        [Before(order=1)]
                        public function runBeforeEveryTest():void
                        {
                            superLabel = new SuperLabel();
                        }
                       
                        [After]
                        public function runAfterEveryTest():void
                        {
                            superLabel = null;
                        }
                       
                        //-----------------------------
                        // Tests
                        //-----------------------------
                        [Test(description="Tests Setting 'Hello World' Text in SuperLabel")]
                        public function testSetHelloWorldText():void
                        {
                            superLabel.text = "Hello World";
                            Assert.assertEquals("Super Hello World", superLabel.text);
                        }
                       
                        [Test(description="Tests Setting NULL in SuperLabel")]
                        public function testSetNullText():void
                        {
                            superLabel.text = null;
                            //fail
                            Assert.assertEquals("Super ", superLabel.text);
                            //pass
                            //Assert.assertEquals("Super null", superLabel.text);
                        }
                       
                        [Test(description="Tests Setting '' in SuperLabel")]
                        public function testSetEmptyText():void
                        {
                            superLabel.text = "";
                            Assert.assertEquals("Super ", superLabel.text);
                        }
                   
                    }
                }

                • 5. Re: Empty Report File
                  legrosb Level 3

                  @jonbcampos - Hmm, that is totally weird.  I'll have to try and reproduce the error on a Windows machine.  Can you post the code for SuperLabel and your entire Ant script so I can emulate your test?  Stupid question, what are you using to confirm the TEST-*.xml files are empty?  Sometimes opening them in IE/Firefox won't show the document if its incorrectly formatted, unless you use View Source.  Not trying to insult your intelligence, just making sure I'm just not missing something obvious.  Are the JUnit HTML reports you're generating empty as well?

                   

                  If anyone else has had this issue with RC1, please let me know so we can find some commonalities.  I'll let you know what I find; may not have anything for ya until next week. 

                   

                  -Brian

                  • 6. Re: Empty Report File
                    jonbcampos Level 1

                    Here is the entire file, I simplified it to just the FlexUnit stuff, and it still fails in the same exact way. I included in the zip the report response, you can see that from a normal text editor that the response is:

                     

                    <?xml version="1.0" encoding="UTF-8" ?>
                    <testsuites />

                     

                    Let me know if you need anything else. I'm happy to help in any way I can and thank you for your help.

                    • 7. Re: Empty Report File
                      legrosb Level 3

                      @jonbcampos - Ok, I think I've found the issue.  It was mostly me not reading your first post in the detail I should have.  The file TEST-TestSuites.xml is not generated by the FlexUnit Ant task, but by the junitreport task.  Currently your build has the following snippet:

                       

                      <junitreport todir="${FlexUnitReport.dir}">
                          <fileset dir="${FlexUnitReport.dir}">
                            <include name="Test-*.xml"/>
                         </fileset>
                         <report format="frames" todir="${FlexUnitReport.dir}/html"/>
                      </junitreport>

                       

                      All of the files generated by the FlexUnit Ant task are prefixed with "TEST-*.xml", not "Test-*.xml".  This is why the junitreport task can't find any test reports to aggregate and generate an HTML template; the include is case sensitive.  FlexUnit is actually working correctly and generating the TEST-tests.unitedmindset.components.SuperLabelTest.xml and TEST-tests.unitedmindset.SampleTest.xml files; these files were included in the attached zip from the last post.

                       

                      Let me know how this works out for ya.

                       

                      -Brian

                      • 8. Re: Empty Report File
                        jonbcampos Level 1

                        Dang, can't believe I missed that. Thank you so much, sorry for the dumb issue.

                        • 9. Re: Empty Report File
                          legrosb Level 3

                          @jonbcampos - No worries, I'm just happy I made the find.  Writing build scripts can be a pain sometimes and its always the little things that trip me up, so I can sympathize.  Best of luck.

                           

                          -Brian