FlexUnit ANT task is hanging

2019-07-19 03:00发布

问题:

I'm using the ANT task to run FlexUnit on a build server. When I run the Flex Unit Tests from the Flash Builder (4) it works fine. But when running from ANT it opens the default player (FireFox in my case), runs the FU successfully but never returns to the command line. Eventually I get a "java.util.concurrent.ExecutionException: Socket timeout waiting for flexunit report" exception because the FU never returns.

What could be the problem?

<flexunit swf="${APP_TEST_FILE_SWF}" 
toDir="${OUTPUT_DIR}/test" 
command="C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\player\win\10.1\FlashPlayerDebugger.exe" 
haltonfailure="true" verbose="true" 
localTrusted="true"/> </target>

回答1:

Also came across this problem. Take a long time to fix it. My solution is make sure you’ve associated .swf files with your standalone flashplayer. You could download Flash Player 11.5 Projector from http://www.adobe.com/support/flashplayer/downloads.html



回答2:

Try change attribute localTrusted to false.