awesome...thanks!

On Oct 26, 10:51 am, Alexandre Reis <[email protected]> wrote:
> http://webcache.googleusercontent.com/search?client=safari&rls=en&q=c...
> Copied from Edison's blog which seems to be down:
>
> To Support Cookies, Using Flexmojos with Firefox to Run Unittests for CI
> Server(Hudson) in Headless Environment
> <http://www.hydra1983.com/?p=1786>February
> 20th, 2010
>
> Flexmojos is a convenient tool used to compile and test flex applications.
> However, when running unittests in headless linux with Hudson, I met a
> problem caused by cookies. The server side needs cookies to make sure
> requests are valid. I googled a lot and find such a solution finally.
>
>    1. you are required to install xvfb according the instructions in this
>    
> article<https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests#Runnin...>
>    .
>    2. you must have firefox 3.x.x installed.
>    3. navigate to “about:config” in firefox and set
>    “dom.allow_scripts_to_close_windows” to “true”;
>    4. register executions for flexmojos-maven-plugin like this:
>
>    <executions>
>         <execution>
>                 <id>default-test-compile</id>
>                 <configuration>
>                         <useNetwork>false</useNetwork>
>                 </configuration>
>         </execution>
>
>         <execution>
>                 <id>default-test-run</id>
>                 <configuration>
>                         <flashPlayerCommand>firefox</flashPlayerCommand>
>                 </configuration>
>         </execution>
>    </executions>
>
>    5. download proper SWC according to the flexmojos version
> here<http://repository.sonatype.org/content/groups/flexgroup/org/sonatype/...>.
>    For example, I am using flexmojos 3.5.0, so I choose to download
>    
> flexmojos-unittest-support-3.5.0.swc<http://repository.sonatype.org/content/groups/flexgroup/org/sonatype/...>
>    .
>    6. checkout source code of flex-unittests-support with svn
> here<http://svn.sonatype.org/flexmojos/trunk/flexmojos-testing/flexmojos-u...>
>    .
>    7. create a flex library project with flex(flash) builder called
>    “flexmojos-unittest-support”, a sample project you can find here.
>
>      *flexmojos-unittest-support.rar
> <http://www.hydra1983.com/?dl_id=13>* (40.6
>    KiB, 120 hits)
>    8. modify function exitFP defined in class
>    org.sonatype.flexmojos.unitestingsupport.ControlSocket:
>
>                 private function exitFP( event:* ):void
>                 {
>                         //Exiting
>                         trace("Exiting");
>                         if(ExternalInterface.available)
>                         {
>                                 var functionStr:String = "function()" +
>                                         "{" +
>                                                 "window.opener=null;" +
>                                                 "window.open('','_self');" +
>                                                 "window.close();" +
>                                         "}";
>
>                                 ExternalInterface.call(functionStr);
>                         }
>                         else
>                         {
>                                 fscommand("quit");
>                         }
>                 }
>
>    9. add flexmojos-unittests-support-x.x.x.swc as a library of this
>    project.
>    10. compile and build flexmojos-unittest-support.swc.
>    11. install flexmojos-unittest-support.swc into maven repository
>    according to the version of the flexmojos being used. For example, I am
>    using flexmojos-3.5.0, so I run the command below under the bin directory 
> of
>    the flex library project:
>
>    mvn install:install-file -DgroupId=org.sonatype.flexmojos
> -DartifactId=flexmojos-unittest-support
>    -Dversion=3.5.0 -Dpackaging=swc
> -Dfile=flexmojos-unittest-support.swc -DcreateChecksum=true
>
>    12. now, you can run unittests with hudson supporting cookies.
>
> NOTE: The javascript code used to close the browser can work with firefox,
> can not work with IE8. I do not test the other browsers.
>
> Alexandre M. Reishttp://alexmreis.com
> +55 41 8869 3321
> +55 41 3244 7667
>
> On Tue, Oct 26, 2010 at 10:30 AM, Christofer Dutz <
>
>
>
> [email protected]> wrote:
> > Well if the issue is that you have problems authenticating
> > I use per-client-authentication. With this setting turned on BlazeDS stores
> > the authentication information in the flex client and uses the flex clientId
> > instead of the session Id to sync.
>
> > Chris
>
> > 2010/10/26 David Vree <[email protected]>
>
> > I have just (re)discovered that the use of the stand-alone player will
> >> not work for the purposes of running integration tests that make use
> >> of the BlazeDS remoting backend.  Without the support of cookies on
> >> the client, the server is constantly barking about duplicate
> >> flexsessions.  Anyone come up with a workaround for this?
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Flex Mojos" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]<flex-mojos%2bunsubscr...@googlegrou
> >>  ps.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/flex-mojos
>
> >>http://flexmojos.sonatype.org/
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Flex Mojos" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<flex-mojos%2bunsubscr...@googlegrou 
> > ps.com>
> > For more options, visit this group at
> >http://groups.google.com/group/flex-mojos
>
> >http://flexmojos.sonatype.org/

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos

http://flexmojos.sonatype.org/

Reply via email to