Which CI server do you use for Flex? My main contenders are currently
Hudson
TeamCity
Both seem to be popular on the general level but have you got some direct experience with using one or both with Flex development? Or would you recommend some other tool?
We use Hudson in combination with SVN and it works quite well. Both the Java code and the Flex code is built using Maven and the Flex Mojos plugin. The build also runs the unit tests for the Flex code and it integrates the results in the build reports. The Flex Mojos plugin makes this really easy.
We use Hudson.
We are working on a Java/Flex application.
Ant is the build system. SVN the source manager.
We have a ant task for compiling the mxml and the actionScript.
Hudson is on a virtual machine, SVN on another, and the build are archived / deployed on a third.
Hudson call the ant task on due time. ( After each commit on the flex code )
No Unit test are call for flex. For java yes. But you can call FlexUnit ( or FlexMonkey ) throught a ant script as well.
After running the test, the build is deployed on another VM.
It's run with no pain. You just have to have a working ant task for compilling the flex part of your application.
If your using maven, hudson handle it too. He can also play .bat or .sh script and check the output.
About your choice between teamcity / hudson, i think the two of them are very close.
Related
I have several Flex Builder projects which depend on each other (both libraries and "applications", i.e. projects which generate an SWF), and want to compile them from commandline. I know there is the fb.exportReleaseBuild ant-Task, but unfortunately it doesn't work on Linux and only comes with Flex Builder.
Is there any other way to build those projects, including their dependencies, from commandline?
One nifty toolset is Antenae which has templates for handling nested project with various library dependencies. It's basically bunch of Ant scripts that provide quite a high level of abstraction to the whole build process.
Yes, use the command line compiler in the Flex SDK. More info
You can use command line to compile flex projects. But you will have to enter the commands manually. Alternatively you can use ant build. Ant is available for GNU/Linux as well. Or which ever build you are comfortable with.
I don't have eclipse on my system at all, but I have on my hands an eclipse project (flex) that I would like to compile and I was wondering if there was any way to do it with minimal to no changes having to be made. Is this possible?
I am not aware of a full automatic process which would take a Flex Eclipse project and generate the build.xml.
You could try and take advantage of your eclipse environment to write a ant builder:
You can also try flex2ant to add a specific Ant task to the Ant installation that is part of the Eclipse IDE, therefore making this task visible to the Eclipse environment.
That would facilitate the manual process mentioned above.
I'd like to set up my projects in Eclipse to run FlexUnit tests everytime I save my work.
I found an example with JUnit here : http://misko.hevery.com/2009/05/07/configure-your-ide-to-run-your-tests-automatically/
How would you do it? Is it possible to run FlexUnit tests without Flash Player?
Yes, you could create a setup much like the one Misko describes using FlexUnit4. The key is creating an ANT build script that compiles your test runner and then invokes the FlexUnit ANT task on the resulting SWF.
Once you have the ANT build script setup you can jump right into step 4, as outlined in the article.
Getting the ANT build script setup correctly can be a little tricky if you're not familiar with ANT. I found the continuous integration (CI) sample project provided by the FlexUnit4 team to be a great reference. As of this writing, it's available here:
http://opensource.adobe.com/svn/opensource/flexunit/branches/4.x/FlexUnit4SampleCIProject/
Try using Flex Builder 4 beta, it has unit testing integration built in.
Are you using the FlexUnit plugin for Eclipse?
I don't know it, but it should execute FlexUnit tests.
If you want to execute something after you saved, you could use the Save Actions in Eclipse. They are inserted in org.eclipse.jdt.ui.cleanUps (according to a mailing list post).
Oh, I recently found this blog entry: FlexUnit + Ant. It seems like it covers your problem!
Good luck with that!
I'm using Flexbuilder as an IDE, and I'm working on automating the process of building my application.
In the process of setting up the ant build file, I noticed that there's no way to call the project using the list of dependancies that Flex builder stores - each library or library project has to be added to the flex compiler commands manually. This creates an enormous burden on the developers to update the build scripts, and makes the build process very uncomfortably fragile.
Is there an option or third party project that addresses this? Failing that, is it possible to build using Flex builder's process via command line?
This answer might be of use.
automating component libraries
My team builds reusable libraries for other (internal) software development teams. We use FlexBuilder 3 as our development environment. Our SCM standards state that these projects must include test harnesses and a unit test runner, and (of course) we want to be able to use the debugger. For that reason, all the projects are Applications.
Our build scripts (used primarily by the CI system and for release deployment) build our actual libraries which works great. This approach is used so that FlexBuilder is not required to actually build our production artifacts (on the command line).
The problem is this - in order to have add a FlexBuilder Project to the Library Path for an Application it must be a Library Project. I have tried adding a nature to the project that we want included, but haven't gotten it to work yet. You would want to do that if you wanted to debug source files in another project.
A simple (yet annoying) work around is to include the source folder of the "library project" as a source folder in the "application project." It's annoying because it takes multiple steps to swap between a swc of the "library project" and the source folder of the project itself.
I would also suggest breaking this up into 2 projects. Have 1 library project and 1 application for the tests and the testrunner.
On a sidenote: FlexBuilder 4 will have support for running FlexUnit tests in the IDE, for both Flex applications and Flex library projects. So you won't have to maintain an application just for the sake of running the tests.
Assuming it is possible, I'd suggest adjusting your SCM standards to allow test harnesses and unit test runners to exist in other projects. Simply mandate that any library project must include a companion test project.
I don't know that this is going to make it any easier, but I would actually make the library and the testing harness seperate projects. This would allow you to source control each and would solve your problem with flexbuilder. Its not going to make it easier to work with, but it will be cleaner and the easiest to update.
I didn't totally understand the description of your situation, but if it's helpful, I'll describe how we have organized our Flex projects. The majority of our application code is contained within a SWC ("library") project. We then create two SWF ("application") projects - a "shell" application which represents the final output SWF, and a test harness FlexUnit 2 application. Both of these SWF projects reference the SWC project using a source path. Using this approach has made it trivial to enable unit testing for the application codebase in the SWC.