2 Replies Latest reply on Aug 28, 2009 6:50 PM by legrosb

    Running headless & CI

    JoeNMDA

      Hi Folks,

       

      Here's what I'm trying to do and need some advice: seems that FlexUnit 4 in its Beta 2 incarnation will not run on a headless Linux CI machine but Fluint will? Is this a correct statement so far? So looks like for now going with Fluint is a good idea until headless is supported in FlexUnit 4?

       

      Also, we're a small shop and TeamCity being free for under 20 users looks pretty sweet, but is there a better system to be looking at in terms of integration with FlexUnit 4 down the line as it matures? Has anybody had luck integrating TeamCity and Fluint? What CI system would you guys recommend?

       

       

      Thanks for the advice,

      Joe

        • 1. Re: Running headless & CI
          mlabriola Level 4

          Joe,

           

          I will let others with more experience answer the CI preference question.

           

          Let me address the headless one. Neither Fluint, FlexUnit nor Flex itself works in a headless environment. That is because Flash Player will not work headless. On Linux, it is possible to run a virtual framebuffer which fools the Flash Player into starting even without appropriate video display.

           

          You can find instructions about how that might work here:

           

          http://groups.google.com/group/fluint-discussions/browse_thread/thread/b4be801162a00dfc

           

          Using the Fluint ant tasks, this virtual framebuffer is started before running the tests. We have not yet had the chance to write that into the ant tasks in FlexUnit 4.The point I just want to be sure to make is that neither Fluint nor FlexUnit 4 has any type of native support for running headless, flash player doesn't give us that option.

           

          It is simply that this area of the ant tasks for Fluint is further along than the ant tasks for FlexUnit 4.

           

          As far as FU4 versus Fluint advice. FU4 has many more features and a much easier integration path with CI servers than Fluint. However, Fluint is past its 1.0 release, whereas FlexUnit4 is still in Beta, so the choice is yours.

           

          Mike

          • 2. Re: Running headless & CI
            legrosb Level 3

            @JoeMNDA - Sounds like Mike has answered you questions re: FlexUnit 4 vs Fluint pros and cons, so I'll try to help with the other questions to the best of my understanding of the available tools.

             

            If you'd like to run a process headlessly in Linux with tasks that utilize the Flash Player like the way FU4's Ant task does, then you have a couple options at your disposal.  One is using xvfb, which is a way to direct display output to a virtual frame buffer via XWindows.  A popular incarnation of this tool is xvfb-run which abstracts most of the details of xvfb from the user and just directs the display output on a per run basis.  This is the way that Flex-Mojos integrates "headless-ness" into its test-run goal as well as the way that Fluint integrates with xvfb in its Ant task.  Ideally, this is the tool we'll use for the FU4 Ant task in the next release (coming to source code over the next few weeks).  Another option is to use xvnc, but I'm not as familiar with this approach.

             

            In terms of continuous integration servers, I'd strongly suggest you take a look at Hudson (https://hudson.dev.java.net/).  It's an OSS CI server built and maintained by Sun that run in any JEE container and is stupid simple to configure; additionally, Sun(Oracle) offers support contracts if needed now.  If you're doing Java, PHP, C++, or even .NET development on the backend for your Flex application, Hudson is your server.  The ease of use via GUI configuration and plugin support are reason enough to give the application serious consideration.  Hudson also has an xvnc plugin that makes setting up headless builds w/o the tools to do, really simple.  Hudson is what my team uses at the office for Flex, Java, and Groovy development.  If you're interested in other alternatives besides Hudson, there is TeamCity, as you mentioned, Cruise Control (http://cruisecontrol.sourceforge.net/) which has Java, .NET, and Ruby incarnations, and Atlassian Bamboo (http://www.atlassian.com/software/bamboo/) as well as many others.  I've never used TeamCity before, but JetBrains is a great company, so I'd say explore and find out what makes you comfortable.  Consider all the languages you work with and try to find a good balance feature-wise from what's out there.  If you find yourself drudging through XML and fighting with server config, that may be a sign to look at other products.

             

            Hope this helps.  As I add xvfb-run support to FU4 and other features, I'll post on the forums with instructions so people can test can begin to find gremlins.