0 Replies Latest reply: Aug 17, 2012 11:18 PM by mayanks20 RSS

    ANT Build script failing while generating junit style reports

    mayanks20 Community Member

      Hi,

       

       

      Actually I got an ANT build script which does the following:

      1) compiles AS code and generates swc

      2) generate AS docs

      3) compiles flex unit reports

      4) Generate wrappers

       

       

      the last part is getting the xml style reporting.

       

      here is the ant script for that part:

       

      <target name="executeTestRunner" description="executes the test runner app">

                          <echo>Running Test Runner SWF</echo>

                          <flexunit swf="${Test.dir}/${TestRunner.name}.swf"

                                    toDir="${FlexUnitReport.dir}"

                                    haltonfailure="false"

                                    verbose="true"

                                    localTrusted="true"/>

                          <echo>Ran Test Runner SWF</echo>

       

                          <echo>Generate Readable Tests</echo>

                          <junitreport todir="${FlexUnitReport.dir}">

                                    <fileset dir="${FlexUnitReport.dir}">

                                              <include name="Test-*.xml"/>

                                    </fileset>

                                    <report format="frames" todir="${FlexUnitReport.dir}/html"/>

                          </junitreport>

                          <echo>Generated Readable Tests</echo>

                </target>

       

       

      I got this error after running:

       

       

       

      flexunit] haltonfailure: [false]

      [flexunit] headless: [false]

      [flexunit] display: [99]

      [flexunit] localTrusted: [true]

      [flexunit] player: [flash]

      [flexunit] command: [C:\Program Files\Adobe\Adobe Flash Builder for Force.com\sdks\4.5.1.21328\runtimes\player\10.2\win\FlashPlayerDebugg er.exe]

      [flexunit] port: [1024]

      [flexunit] swf: [C:\Users\user\Documents\workspace\project\bin-debug\projectTestRunne r.swf]

      [flexunit] timeout: [60000ms]

      [flexunit] toDir: [C:\Users\user\Documents\workspace\project\report]

      [flexunit] Setting up server process ...

      [flexunit] Starting server ...

      [flexunit] Opening server socket on port [1024].

      [flexunit] Waiting for client connection ...

       

       

      [flexunit] Stopping server ...

      [flexunit] End of test data reached, sending acknowledgement to player ...

      [flexunit] Closing client connection ...

      [flexunit] Closing server on port [1024] ...

      BUILD FAILED

       

       

       

       

      I added CIlistener part in mxml also.




      import org.flexunit.listeners.CIListener;

       

      core.addListener(new CIListener());

       

       

      still getting the error.

       

      Any one can help on this.. The intent is to get the headless reports for flex application same as we do phantom/jasmine thing in javascript.

       

       

      Thank a lot

      Mayank