FunFX is a framework for funcional testing of Adobe Flex applications. This post will talk about the background for this tool and some on the implementation decisions.
According to Wikipedia, Adobe Flex is a collection of technologies released by Adobe Systems for the development and deployment of cross platform, rich Internet applications based on the proprietary Adobe Flash platform.
FunFX was initiated by Bekk Consulting in desember 2006 as a master thesis at the Norwegian University of Science and Technology. This was due to Flex's lack of a proper tool for automated functional testing. The only tool was Mercury's Quick Test Professional, which does not support TDD and cost a whole lot of money. We wanted to create an open source version that would support TDD.
I began the work on this framework January 2007, and did not have a lot of experience with Flex. I decided to use Ruby as the language for the actual framework for writing the test scripts.
The first initial problem and the most critical part of this framework was how to be able to talk to the Flex application and make it replay certain events. After some starting tips from Matt Chotin, Sreenivas Ramaswamy, and Matt Horn from Adobe, I decided to use the ExternalInterface API. This enabled me to expose certain "generic" methods out, enabling Ruby scripts to make calls into the Flex application.
I built a Flex library file that acts as an adapter between a Flex application and the Ruby tests. The Ruby framework is dynamically built from an XML file delivered by Adobe that describes all the different display objecs and their events and properties. This makes it possible to write test lines as the following:
@ie.button("name").click
@ie.button("name").label
When running the Ruby script the adapter will try to find a display object by the type button with the name "name" and run either the click event or delivering the lebel text of the button.
The Ruby framework uses the WIN32OLE to drive an Internet Explorer window and the Flex application displayed.
There are currently no support for other browsers or to test a Flex application in the Flash player.
The next post will help getting started with FunFX.
Showing posts with label Framework. Show all posts
Showing posts with label Framework. Show all posts
Saturday, November 17, 2007
Subscribe to:
Posts (Atom)