2

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>
user774868
  • 41
  • 4
  • Can you show your ant config? – J_A_X May 29 '11 at 13:30
  • Here it is: ' ' – user774868 May 31 '11 at 07:33
  • edit your original question... – J_A_X May 31 '11 at 13:52
  • I am facing the exact same problem. I am using Flex 4.1 and the latest flexunit swcs and jars for the 4.1 SDK. I checked the flashlog.txt file, and it simply says "Warning: 'flash' has no property 'prototype'". Ran Test Runner SWF – Neo Jun 06 '11 at 08:08
  • I'm using Flex 4 and getting the same message. Still no solution – user774868 Jun 06 '11 at 12:39
  • 1
    Found the problem! You are probably running the generated MXML file that the Flex Builder creates: FlexUnitApplication.mxml. This will not work with ANT. You need to modify the file add: var unitCore:FlexUnitCore = new FlexUnitCore(); unitCore.addListener(new CIListener()); to the onCreationComplete method. – user774868 Jun 12 '11 at 10:15

2 Answers2

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

Joseph
  • 806
  • 5
  • 17
  • 34
  • 1
    what do you mean by associated .swf files with your flashplayer. Could you please elaborate that? Thanks. – suat Dec 03 '13 at 20:18
0

Try change attribute localTrusted to false.

Oleg Vit'ko
  • 81
  • 1
  • 5