March 28, 2008

Functional Testing for Flex

Filed under: cool, dev, education, flex, functional testing, ruby, tool — michaelangela @ 12:29 am

I don’t know how many times something broke in my flex app and I didn’t know because I didn’t test that bit after updating some code. I have been reading about test driven development, behavior driven development, and most recently “functional testing”. This bit is harder because it’s emulating a user actually using the system.

Enter FunFX

.::FunFX – Functional Testing of Flex applications

FunFX is the only free alternative to achieve functional testing of Adobe Flex applications.

Open-source and uses Ruby

FunFX is open-source and uses Ruby to write tests. Ruby is a simple but yet powerfull language, which makes it possible to write tests that are easy to understand. Ruby was whosen due to its DOM capabilities and the fact that it is a scripting language.

FunFX has used Watir, a great testing tool for web applications, as a model on how to write the tests in Ruby.

FunFX is created as a framework that will enable you to drive a Flex application through a web browser. FunFX together with for instance Test::Unit or rSpec creates a great to for testing and asserting the functionality of a Flex application

It only works on Windows, and it only works with IE, and it’s Ruby so there is a little learning, but not too much for what needs to be done. The idea is you can have it actually run through and click buttons, etc., and make sure things are working right. That’s pretty sweet.

This doesn’t work with all versions of Flex though. I believe you need the Pro versions to do it. But the idea… nice.

It makes a wrapper of all your UI elements, stores it in an XML file that the ruby reads and uses a bridge that is also generated to communicate with the Flex app. I haven’t looked too deeply into it but I am guessing there is a bit of Actionscript/Javascript communication happening here. Good concept though!


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: