Examples

FlexMonkey – Flex Test Automation Tool Review

flexmonkeyMy review plan regarding tools for automated testing of GUI applications written in Adobe Flex, starting from the most promising, easy-to-use FlexMonkey.
The program is based on a sample application AutoQuick made by Adobe, available to present opportunities for Flex Automation API. We are dealing with a typical  Record and Playback application with a small but very significant issue: FlexMonkey generates test scripts in Action Script. It gives us great opportunities to continue work by the test developers, and indeed very easy to integrate with the Continuous Integration tools because the test scripts are the FlexUnit format

So here we go. FlexMonkey is supplied with a sample application for testing, however, that the review had to be worth something, I had to start from scratch. So I downloaded a sample application from Adobe, called FlightReservation, you can directly download it here. The package contains complete file “FlightReservation1.swf” which, according to FlexMonkey documentation should be easy to start with.

So I have copied “FlexMonkeyLauncher.swf” to a Flight Reservation application folder and launched it in Flash Player. Launcher is a panel to manage the recording and playback of test scripts, loads the target application as a module. Unfortunately FlightReservation1.swf launch failed, simply there was no action at all – after a few attempts, I decided to recompile the application in Flex Builder 3 – import project files from the downloaded zip – build and finally had a fresh version of swf. Test loads with Flesh Player – hangs. I decided to run the test in the browser, so I’ve modified file “MonkeyContactsTest.html” provided with the FlexMonkey archive, from “targetSwf = MonkeyContacts” to “targetSwf = FlightReservation1”. It works! I do not know what was the cause of earlier problems but I assume that You will do the tests to Your own applications with the source code, so you’ll always have a fresh swf version.
As you can see the problems there, but it’s always something we can learn on such occasion.

flexmonkey_flightreservation

After clicking “Record” you can start using our example application, several options to choose from combobox, checkbox checking – everything is working perfectly – finally I got ready class FlexUnit with my testing method “testSomething(), now I can play it.

[cc lang=”javascript”]
// Test test method
public function testSomething():void {
var cmdRunner:CommandRunner = new CommandRunner();
cmdRunner.addEventListener(MonkeyEvent.READY_FOR_VALIDATION, addAsync(verifySomething, 10000));
cmdRunner.runCommands([
new FlexCommand(“departureCityComboBox”, “Open”, [“null”], “automationName”),
new FlexCommand(“departureCityComboBox”, “Select”, [“London (LHR)”, “1”, “0”], “automationName”),
new FlexCommand(“arrivalCityComboBox”, “Open”, [“null”], “automationName”),
new FlexCommand(“arrivalCityComboBox”, “Select”, [“Sao Paulo (GRU)”, “1”, “0”], “automationName”),
new FlexCommand(“One Way”, “Click”, [“0”], “automationName”)            ]);
}
[/cc]

Of course, the code can be modified by adding assertions, closely associated with the FlexUnit, example Assert.assertEquals(“test”,textBox1.text);

FlexMonkey also contains a feature to making a screenshot, which is quite important because often we want to know the cause of an auto-test – the easiest way is to start looking at the picture:)

Summary
Looking at the whole family of automated GUI testing tools, FlexMonkey certainly deserves a honorable mention – is a complete tool, although version 0.8.
Using Continuous Integration and the code repository can quickly combine to create solution very similar to RIATest or other profesional and expensive software.

Links
Another FlexMonkey review

Discussion

5 comments for “FlexMonkey – Flex Test Automation Tool Review”

  1. […] FlexMonkey – Flex Test Automation Tool Review | Test And Try […]

    Posted by Trading Techniques | Yoobi Forex | April 14, 2009, 11:50 am
  2. […] Zreda provided a review on FlexMonkey version 0.8 in a recent blog entry.  He hit on some the key items that set […]

    Posted by FlexMonkey :: Flex UI Testing Tool » Community Review: FlexMonkey (Flex UI Testing Tool) | June 3, 2009, 8:11 am
  3. […] months ago I reviewed FlexMonkey as a test automation tool. Great stuff but with no official release > 1.0 Now we have to download fresh and ready 1.0 […]

    Posted by FlexMonkey 1.0 - Complete Testing Solution ? | Test And Try | July 15, 2009, 3:52 pm
  4. […] 1. Flex Monkey Automation Tool Review 2. RIATest 3 – Professional Flex Test Automation 3. Test Automation with AutoIt Start And […]

    Posted by TestAndTry – What We Read in 2009 | Test And Try | January 6, 2010, 12:32 pm
  5. […] FlexMonkey для тестирования приложений, написанных в среде Adobe […]

    Posted by OpenQuality.ru | Апрельская лента (2009): лучшее за месяц | February 13, 2010, 7:42 pm

Post a comment