flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 3rgqrm...@sneakemail.com
Subject Can FlexUnit support accessing the test SWF via HTTP (URL)?
Date Tue, 27 Aug 2013 16:06:03 GMT
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:


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):


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, which was created in 2012: http://code.google.com/p/flexunit-with-code-coverage/.

Trevor Butler
Software Developer ▪ Distributed Java Testing Environment 


View raw message