Quantcast
Channel: Adobe Community : Popular Discussions - FlexUnit
Viewing all articles
Browse latest Browse all 25673

Help using FlexUnit with Nant

$
0
0

Hi,

 

I created some tests which run perfectly if I use my IDE (FlashDevelop) to run them. I've been trying to create a Nant script to automate my tests and have the results written into an xml file. The entire build system where I work uses Nant instead of Ant, so I can't really follow the Ant examples.

 

I am able to compile my main and my test classes into a swf like this:

 

    <target name="compile" depends="cleanup">

        <!-- mkdir dir="${executable.dir}" / -->

        <exec program="mxmlc.exe" workingdir="." verbose="true">

            <arg value="-compiler.strict" />

            <arg value="-compiler.source-path" />

            <arg value="..\engineunittests\src" />

            <arg value="-static-link-runtime-shared-libraries" />

            <arg value="-output" />

            <arg value="${executable.dir}\EngineUnitTests.swf" />

            <arg value="-compiler.include-libraries" />

            <arg value="${flexunit.dir}\flexunit-4.1.0-8-as3_4.1.0.16076.swc" />

            <arg value="${flexunit.dir}\flexunit-uilistener-4.1.0-8-4.1.0.16076.swc" />

            <arg value="--" />

            <arg value="${source.dir}\com\playbrains\metagame\test\Main.as" />

        </exec>

    </target>

 

That works fine, then I try to run it like this:

 

    <target name="runtest" depends="setup">

        <mkdir dir="${output.dir}" />

        <exec program="adl.exe" workingdir="${executable.dir}" verbose="true">

            <arg value="application.xml" />

            <arg value="--" />

            <arg value="${output.dir}" />

        </exec>

    </target>

 

This runs the swf and the tests but the problem is that it opens the air debug window and it never closes, and the results are never written on any xml file.

 

How can I configure my swf so that it stops the adl window when it is done and also write down the results on an xml file?

 

Thanks,

 

Franco


Viewing all articles
Browse latest Browse all 25673

Trending Articles