Running Flexunit 4 Test from IDE

Hi, I am on Ubuntu 10.10 64-bit. I have downloaded Flex4 SDK and extracted to /opt/flex. I have a Maven 2 based project and the following dependencies:

        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>3.2.0.3958</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.adobe.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>4.0-rc-1</version>
            <type>swc</type>
            <scope>test</scope>
        </dependency>

In my Flex Unit configuration for each test I use "Launch with: /opt/flex/runtimes/player/10.1/lnx/flashplayerdebugger".When I click the green play arrow to run the test, I have to select a HTML Wrapper and the only option I have is the "target/test-classes/TestRunner.swf" I guess that is generated by the flexunit framework?

After this, the flashplayer popup up but I get see error message:

An ActionScript error has occurred:
Error #2044: Unhandled ioError:. text=Error #2031: Socket Error. URL: 127.0.0.1
    at org.sonatype.flexmojos.unitestingsupport::SocketReporter/sendResults()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/SocketReporter.as:133]
    at Function/<anonymous>()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/SocketReporter.as:281]
    at Function/<anonymous>()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\binding\utils\BindingUtils.as:145]
    at mx.binding.utils::ChangeWatcher/wrapHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\binding\utils\ChangeWatcher.as:423]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.sonatype.flexmojos.unitestingsupport::SocketReporter/dispatchEvent()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/SocketReporter.as:42]
    at org.sonatype.flexmojos.unitestingsupport::SocketReporter/set totalTestCount()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/SocketReporter.as:39]
    at org.sonatype.flexmojos.unitestingsupport::SocketReporter/runTests()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/SocketReporter.as:243]
    at org.sonatype.flexmojos.unitestingsupport::TestApplication/runTests()[/home/nexus/flexmojos/trunk/target/checkout/flexmojos-testing/flexmojos-unittest-support/src/main/flex/org/sonatype/flexmojos/unitestingsupport/TestApplication.as:40]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
    at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
    at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
    at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]


Also IntelliJ hangs on "Instantiating Tests ...". I assume there is a communication problem between the player and IntelliJ. localhost is properly set in /etc/hosts. Any idea what it could be?

1 comment
Comment actions Permalink

Probably you have 'Make before launch' check box unchecked for your FlexUnit run configuration or 'Use IDE builder' unchecked at File | Settings | Modules | <your module> | Flex facet

0

Please sign in to leave a comment.