3 Replies Latest reply on Jan 25, 2010 6:48 AM by trevorbutler

    FlexUnit XML reports lacking details

    trevorbutler Level 1

      I have been working on integrating FlexUnit support into a CI framework at my company, and FlexUnit4's CI Ant tasks have been invaluable to me. So, kudos to the good folks here who have been working on FlexUnit4!

       

      Now, my question: Is it just me, or does anyone else think that the XML reports generated by FlexUnit lack detail?

       

      For instance, if I run a JUnit test in Java-land, any failures in the JUnit XML report contain not only the failure message, but also the stack traceback.e.g.:

       

        <testcase classname="com.solutions.di.tools.junit.AllTests" name="testRegProdGeoLvl" time="0.0">

          <error message="Timeout occurred. Please note the time in the report does not reflect the time until the timeout." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.

                      at com.sas.djte.junit.JUnitCaller.callJUnit(JUnitCaller.java:364)

                      at com.sas.djte.junit.JUnitCaller.execute(JUnitCaller.java:195)

                      at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:212)

                      at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)

                      at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:162)

                      at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)

                      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)

                      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)

                      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)

                      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)

                      at embedded_script_in_C__Program_Files_DJTE_import_dot_macrodef.run(embedded_script_in_C__Pr ogram_Files_DJTE_import_dot_macrodef:18)

                      at org.codehaus.groovy.ant.Groovy.parseAndRunScript(Groovy.java:425)

                      at org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:404)

                      at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:279)

                      at net.sf.antcontrib.logic.TryCatchTask.execute(TryCatchTask.java:207)

                      at net.sf.antcontrib.logic.TryCatchTask.execute(TryCatchTask.java:207)

      </error>

       

      But with FlexUnit4, failures only seem to contain a brief message, no tracebacks:

       

        <testcase classname="com.commons.resources::ResourceLoaderTest" name="testLocalizedContentFRFR" time="0.000" status="failure">

          <failure message="ResourceLoader.LOCALE_CHANGED event did not fire as expected!!" type="com.commons.resources::ResourceLoaderTest.testLocalizedContentFRFR"><![CDATA[]]></f ailure>

        </testcase>

       

      I am using the "verbose=true" setting with the <flexunit> Ant task.  Is there any plan to beef up the output in the reported XML results?

       

      Thanks,

      Trevor

       

        • 1. Re: FlexUnit XML reports lacking details
          legrosb Level 3

          @trevorbutler - Glad to hear you like the Ant tasks; always good to see people are using and testing them out.  The stack traces for failures and errors are currently setup to be produced by the CI Listener and transmitted to the Ant task.  Which version of the FlexUnit4CIListener and FlexUnit4AntTasks are you using?  Beta2, RC1, or the latest clone from GitHub?  If you download the FlexUnit4SampleCIProject and run the Ant build that comes with it, you'll see that it produces these stacktraces.  Are you executing your tests using a release standalone Flash Player or debug player? The release version may hamper the stacktraces from appearing as well; just a guess though.

           

          Give the sample project a go and see how it turns out.  If you're still now seeing the stacktrace, then it would be something specific to your setup.  Hope this helps.

           

          -Brian

          • 2. Re: FlexUnit XML reports lacking details
            mlabriola Level 4

            Trevor,

             

            I think Brian got it right. In Flash, the stack trace is only available to us if you are using the debug player. We have no way to grab that info and provide it if you are running the production player, and that is my guess here.

             

            Mike

            • 3. Re: FlexUnit XML reports lacking details
              trevorbutler Level 1

              Brian and Mike,

               

              Thanks...  yeah, we are using the release stand-alone player, not the debug player.  I thought we were doing the right thing by using the release player, but I guess for the sake of providing as much detail as possible, we need to switch back to the debug player.

               

              Thanks for your help with this question, and thanks for the excellent work on FlexUnit CI...

               

              Regards,

              Trevor