Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's a target that will compile the tests into a swf and run them. The tests are run using the exec task. This version uses the <em>open</em> command from the Mac OS. </p> <p>For Windows I can only think of using a property set to the complete path to the Flash player exe and using that to run the tests.</p> <pre><code>&lt;target name="tests"&gt; &lt;taskdef resource="flexTasks.tasks" classpath="${flextask.jar}" /&gt; &lt;mxmlc file="${test.main}" output="${tests.output}" incremental="true" debug="false" static-link-runtime-shared-libraries="true"&gt; &lt;source-path path-element="${tests.dir}"/&gt; &lt;load-config filename="${flex.config}" /&gt; &lt;library-path dir="${flex.lib}" append="true"&gt; &lt;include name="flex.swc" /&gt; &lt;/library-path&gt; &lt;library-path dir="${libs.test.dir}" append="true"&gt; &lt;include name="*.swc" /&gt; &lt;/library-path&gt; &lt;/mxmlc&gt; &lt;exec executable="open" os="Mac OS X"&gt; &lt;arg line='-a "flash player" ${tests.output}' /&gt; &lt;/exec&gt; &lt;/target&gt; </code></pre> <p>Here's the properties:</p> <pre><code># Build locations src.dir=${basedir}/src/main/actionscript package.dir=your/apps/package libs.dir=${basedir}/libs output.dir=${basedir}/bin output.swc=${output.dir}/${project.name.versioned}.swc # testing tests.dir=${basedir}/src/test/actionscript tests.output=${output.dir}/${ant.project.name}-tests.swf libs.test.dir=${basedir}/src/test/libs test.main=test.main=${tests.dir}/${package.dir}/AllTestsRunner.as docs.dir=${basedir}/docs # flex resources flex.config=${FLEX_HOME}/frameworks/flex-config.xml flex.lib=${FLEX_HOME}/frameworks/libs flextask.jar=${FLEX_HOME}/ant/lib/flexTasks.jar mxmlc.jar=${FLEX_HOME}/lib/mxmlc.jar compc.jar=${FLEX_HOME}/lib/compc.jar </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload