FlexUnit developers/users,

Since newer Flash versions are only available via the Pepper Flash plugin on 
Linux now, we are wanting to run our FlexUnit tests using Chrome/Chromium 
rather than the standalone player.  I can launch Chromium using the “command” 
parameter of the FlexUnit Ant task, so that is good.  However, our test SWFs 
are running on a web server, and need to be accessed using HTTP.  I am passing 
an HTTP URL into the “swf” parameter expecting this value to be passed to the 
command argument, but this is not happening.  Here is my Ant task invocation:


<flexunit

   player="flash"

   
swf=”http://myhost/djte-flex/sas.commons.services.nls.collation.tests.unit.swf?logging=debug”

   toDir="${reports.dir}"

   haltonfailure="false"

   verbose="true"

   localTrusted="true"

   command=”/opt/chromium/chrome-wrapper”

/>

The above looks to be correct, and doing the equivalent using the command line 
works fine. However, running the Ant task, I get this:

'The provided 'swf' property value 
[/local/users/userid/projects/sas.commons.services.nls.collation_swc/d4flxcmn42/extracted/Source/Flex/http:/myhost/djte-flex/sas.commons.services.nls.collation.tests.unit.swf?logging=debug]
 could not be found.

The “swf” value is being munged by the Ant task it seems. A quick look at the 
source code indicates that a file resolve is being performed, so I guess the 
“swf” parameter only expects Files, not URLs.  I am not very familiar with the 
code but, in looking through it this afternoon, I see what appears to be 
support for URLs? (e.g. the TestRunConfiguration class has a setUrl() method, 
and the CustomPlayerCommand class appears to use the url value if it is set.) 
However, unfortunately, there is no way that I can see of passing a URL to the 
Ant task (i.e. there is no setUrl() method on FlexUnitTask).

Accessing the test SWF using a URL is(was) of interest to others also.  I saw 
two posts to the forums about it back in 2010, and figured since a JIRA ticket 
was opened this functionality was probably completed by now (hopefully):

http://forums.adobe.com/thread/633277
http://forums.adobe.com/thread/740495

Perhaps I am missing something here.  Can anyone please let me know if it is 
possible with the current FlexUnit to access a SWF using HTTP via a browser?   
BTW, I am using Jason Gardner’s fork of FlexUnit 4.1.0.8, which was created in 
2012: http://code.google.com/p/flexunit-with-code-coverage/.

Thanks,
-------------------------------------------------------------------------
Trevor Butler
Software Developer ▪ Distributed Java Testing Environment
[email protected]
www.sas.com

SAS® … THE POWER TO KNOW®

Reply via email to