FlexUnit 4 Beta 2 is finally here (and it likes your CI Server)

Alright, it has been an insane few months but we are ready. FlexUnit 4 Beta 2 is now available on the adobe open source site. You can download the turnkey project to play with built libraries quickly or follow the directions on the Source page to grab the source yourself.

There are a huge number of fixes and enhancements in this version, all of which you can find for yourself on the release notes page but the largest change of note is the availability of CI tasks and a CI listener to allow easy hooks into the continuous integration system of your choice. A lot of hard work went into building and vetting these out on different platforms but I wanted to call out a few names in particular.

First, thanks to Peter Martin, because all of this was based on his original work for the FlexUnit .9 tasks. Second, thanks to Joe Adkins, Conrad Winchester, Brian LeGros, Xavi Beumala and Simeon Bateman all of who contributed to development, testing and/or generally being good spirits despite inevitable development slow-downs and hiccups. This is beta code, so there are a couple of caveats and to-do items still on the list, so please be sure to check out the README file in the sample project, or read it on the wiki.

So, take a few minutes, grab the bits and play around. If you have any questions or comments, in particular around the new CI tasks, head over to the FlexUnit forums. If you believe we mutually disagree on the definition of a functional feature, then please log it into the bug database.

This is a completely community run project and your help and support are always welcome.

Cheers,
Labriola

FlexUnit 4 and Flash Builder 4

So, suppose you are the kind of person who has downloaded the FlexUnit 4 turnkey beta from opensource.adobe.com. Suppose you are also the type of person who downloaded the new Flash Builder 4 beta from labs.adobe.com. Well then perhaps you are thinking to yourself, "Self, I would really like to see the results from my FlexUnit 4 tests right inside of the FlexUnit Result view in Flash Builder. I wonder how I would do that."

Well, I would personally suggest you add the following import to your FlexUnit4Turnkey.mxml file:

import org.flexunit.runner.notification.async.XMLListener;

And then add the following line before your call to the run method of the FlexUnit 4 core.

core.addListener( new XMLListener( "FlexUnit4Turnkey" ) );

Ideally, it will look something like this:

core = new FlexUnitCore();
core.addListener( new XMLListener( "FlexUnit4Turnkey" ) );
core.run( FlexUnit4Suite, HamcrestSuite, FlexUnitIn360 );

Where the string "FlexUnit4Turnkey" represents the name of the project where this MXML file resides. If you open the FlexUnit Results view in Flash Builder and execute this MXML file, you will see the results in Flash Builder.

Unfortunately, you need to be aware of some of limitations. First, Flash Builder doesn't know how to generate these tests yet and will currently fail if you click any of the buttons such as Run All Completed Tests, Run All Failed Tests, etc. We can just give it back information about the success and failure, Flash Builder doesn't yet know how to choose, run or specify FlexUnit 4 tests. Also, and perhaps more severely, Flash Builder considers any Ignored tests a pseudo-failure. Truthfully, it just doesn't understand what we mean, so, in some cases, it looks like a failure, but in others it doesn't.

Right now, FlexUnit 4 beta still also outputs to the console, which means Flash Builder will try to keep switching you over to the console view, but this will be a little cleaner in our (FlexUnit's) next beta drop. In either case, it is perhaps a bit of a novelty for the moment, but it demonstrates the power of the listener model that FlexUnit 4 uses. Wait till you see the stuff coming for Continuous Integration :)


Cheers and have fun,
Labriola

FlexUnit 4 in 360 seconds

About a year back I remember reading a blog post called JUnit in 60 seconds. At the time I pondered how great it would be to have these features in Flex. Little did I know that today I would be writing this post introducing the Flex world to FlexUnit 4.

So, first a little background. FlexUnit 4 is the name for an upcoming release of FlexUnit. It represents the best features of the FlexUnit project combined with the best features of the Fluint project. It is built on top of a newly created foundation designed to support the latest techniques used in the JUnit testing community, but written for the specific requirements and needs of the Flash Player. Top all that off with an extensibility layer that encourages developers to create new types of test runners and extensions while simplify the process of integrating the results into IDEs and continuous integration environments, and it should give you an idea why I am excited about this release.

If it sounds interesting to you as well, the public alpha of this upcoming release is now available as a turnkey test project you can download from the adobe open source site. I hope you will use it to learn and explore the new features, and to provide feedback about any bugs you find along the way. However, it is an alpha, so locations and names of classes, signatures of methods and even which features are supported are all subject to change before release. It is not be advisable to use this as your production testing system.

Speaking of features, let's jump in. There is a bit more content to go through than the original 60 second tutorial, so, I think you will need 4-6 minutes to get through it all. To keep things consistent, many of these examples are adapted right from the JUnit in 60 seconds site referenced above.

[More]

Fluint 1.1.0 Released

At the end of last week Fluint 1.1.0 was released. For those of you that don't know, Fluint is a unit and integration testing framework that was originally developed as an internal tool here at digital primates. We decided to open it up to the world as we thought there was some benefit. Turns out that others thought so too.

The greatest thing about this new release is that almost all of the code was written and submitted by community members using the product. Here at DP we have been making some changes internally that we intend to offer back to the project (if the community wants to incorporate them) but in the meantime, the new build offers:

  • Better differentiation of errors and failures
  • Compliant XML output that can be used with JUnitReport and Surefire
  • A method of running Fluint on a headless CI server
  • Improved ant tasks
  • Improved separation of the test runner and tests with modules
  • Bug fixes and a menagerie of other features
At the end of the day, I am just proud to be a part of the project and want to offer a thank you to those who helped on the forums, submitted code or even just complained to bring things to our attention. So, thank you.

Soon we will begin active dialog on the next round of features, so if you are interested, please join the discussion.

Cheers,
Labriola

The King is Dead. Long Live the King!

Some of you may know that Digital Primates released a beta-quality testing framework some time back called dpUInt ( digital primates unit and integration). This started an internal framework we developed for testing UIComponent derivatives. One day we decided it was useful enough to share with the world, so we started a google code project and sent it off into the wild.

Then, wow. More people than we initially expected were running into the same problems we had encountered when testing Flex applications. Soon we were receiving emails and calls from companies using dpUInt who were curious about support and the future of the project. As of this moment, I know of at least a dozen well-known and respected software firms using it for their testing framework and hundreds of developers who have written me with question and suggestions.

Well, I am happy to say that dpUInt has grown up a bit and finally reached the 1.0 stage of its life. Based strongly on the feedback of its users, it is also adopting a new project name, Fluint (pronounced Fluent).

The new google code project, which can be found at http://fluint.googlecode.com/ has been refactored a bit. Instead of acting as a single library project, the new repository has top level directories for each of the following sub-projects:

fluint - Library project used to build fluint.swc
fluint_FlexTestRunner - Simple Flex project with a sample test runner
fluint_AIRTestRunner - AIR project designed to run tests from an automated build environment of simply via command line
fluint_AntTask - Ant Tasks that facilitate running the AIRTestRunner from ANT
fluint_Samples - Samples project that will grow to contain samples uses and modules

The source for all component, including the AIR test runner and ant tasks are now included. Further, a few new features have made the jump to the new project as well:

  • Ant tasks / AIR testing modules now supported (No need to recompile the test runner for new tests)
  • AIR Test Runner with full source for command line and ANT invocation
  • Improved performance
  • Tests can now be marked by [Test] metadata which allows the inclusion of descriptions and additional metadata carried through to the testing UI
  • And of course, bug fixes
While the code and the name are in better shape, we can still use help adding more documentation. So if you are up for helping improve the Wiki pages or for providing any additional forms of documentation including tutorials and videos, we are game.

The google code project has an issues tab for reporting any issues found during use. So, please report bugs or simply file enhancement requests. Planning for the 1.1 release is soon to be under way. We are already committed to simplifying the syntax and readability of testing sequences, but we need help to define what else is going to be on that list.

Thanks,
Labriola

BlogCFC was created by Raymond Camden. This blog is running version 5.9.001.