View unanswered posts | View active topics

Reply to topic  [ 4 posts ] 
FlexUnit on FlashDevelop 
Author Message

Joined: Fri Feb 18, 2011 10:19 am
Posts: 6
Reply with quote

I am part of a team who use flex unit to test the code and it works very well on Flash Builder.

But I prefer FlashDevelop and I would like to know how to make flex unit work on FlashDevelop.

I have read some doc and found that there are several Japanese website mentioning tools to work with flex unit on FlashDevelop: ... nit_4_test

It seems even better than Flash Builder graphical output.

Is someone aware of these works?
Can someone translate since google does a very bad job :)

Thank you.

Tue Mar 01, 2011 6:44 pm

Joined: Fri Feb 18, 2011 10:19 am
Posts: 6
Reply with quote

Fri Jun 10, 2011 3:59 pm

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
We don't use Flex Unit ourselves but if you provide a minimal sample project with code & tests (that would work in FlashBuilder with Flex Unit) then we'll look into it.

Fri Jun 10, 2011 7:17 pm
Profile WWW

Joined: Sun May 11, 2008 3:01 pm
Posts: 895
Reply with quote
Hi, I believe that Ant plugin is still functional. It doesn't require that much of a setup to run FlexUnit with Ant + you will have some extended flexibility in builds + you will be able to automate tasks, which is what Ant is known for.
Here, I picked at random a target I use for running unit tests. Should be no problem to set it up by pattern:

   <taskdef resource="flexUnitTasks.tasks"
. . .

   <target name="fut-net" description="Run FlexUnit tests on net.* package">
      <mxmlc file="${SRC_NET_DIR}/tests/"
         <define name="CONFIG::debug" value="${DEBUGGING}"/>
         <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
         <source-path path-element="${LIB_DIR}"/>
         <source-path path-element="${SRC_NET_DIR}"/>
         <library-path dir="${FLEX_HOME}/frameworks/libs">
            <include name="framework.swc"/>
         <library-path dir="${FLEXUNIT_PATH}">
            <include name="flexunit-4.1.0_RC2-28-as3_3.5.0.12683.swc"/>
            <include name="flexunit-uilistener-4.1.0_RC2-28-"/>
            <include name="flexunit-cilistener-4.1.0_RC2-28-"/>
         <library-path dir="${LIB_NET_DIR}">
            <include name="blooddy_crypto.swc"/>
      <mkdir dir="${FLEX_UNIT_DIR}"/>
         Note: By specifying haltonfailure, the ant script will use a return
         code of 1 instead of 0, which you can use to script validation of
         the test results.
         Note: we may try to experiment later with "half-headless" test runner
         for now it's false.

            command="<path to the executable for the Flash Player or ADL>"
            swf="<path to your SWF file>"
            toDir="<path where XML reports should be written>"
            workingDir="<path to which compilation resource may be copied>"
            port="<port number on which to run the XMLSocket>"
            buffer="<size in bytes of buffer for incoming data from flash movie>"
            timeout="<timeout for the runner in milliseconds>"
            failureproperty="<property name to set to 'true' if any tests fail>"
            display="<X-Windows display # to use in headless mode">
            <source dir="..." />
            <testSource dir="...">
               <include name="**/*" />
               <include name="**/*Test.mxml" />
            <library dir="..." />
      <flexunit swf="${TEST_DIR}/RunnerNet.swf"
      <junitreport todir="${FLEX_UNIT_DIR}">
         <fileset dir="${FLEX_UNIT_DIR}">
            <include name="TEST-*.xml"/>
         <report format="frames" todir="${FLEX_UNIT_DIR}/html"/>

Strange... I think I've read on their wiki they had some integration with FD, but maybe I've dreamed it... in any case, this shouldn't be difficult. Maybe I'll try to make an example project some time :)


Wed Jun 15, 2011 3:19 pm
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.