Flex UI testing with Ranorex

One of the issues with these tools is probably that they use common techniques and/or underlying frameworks to automate Flex applications, such as External Interface, Microsoft Active Accessibility or Flex Automation ... moreover, you should note that using Flex Automation SWCs files requires a Flex Builder license.

Adobe Flex technology is getting more and more popular, and  we have started to build even quite complicated applications using Flex. However, the UI behaviour in Flex  is generally more complex than in HTML/JS/CSS and we quickly realized that we needed a testing tool which could record and replay user actions sequences to help us detect UI issues.

Looking around for testing tools, we came across some open source frameworks  such as FlexMonkey and SeleniumFlex. We also tested the following commercial tools :

  • HP QTP
  • IBM Rational Functional Tester
  • Borland SilkTest
  • RIATest
  • TestComplete

Unfortunately, most of the time, we were quite disappointed with those products because of poor documentation and insufficient user actions record/replay support:  During  one of our tests, we discovered that certain user actions, such as contextual menu selection or drap & drop actions, were not correctly detected or, even worse, were not working anymore.

One of the issues with these tools is probably that they use common techniques and/or underlying frameworks to automate Flex applications, such as External Interface, Microsoft Active Accessibility or Flex Automation ... moreover, you should note that using Flex Automation SWCs files requires a Flex Builder license.

Enter Ranorex (http://www.ranorex.com), which, since its lastest version, can also automate Flex applications. Ranorex provides its own automation framework and therefore does not rely on Flex Automation.

We were able to quickly use it to record everything from from simple to complex testcases,  fine-tune and run them. Components are identified by an Xpath like dialect (RanorexXpath), which is automatically written for you when recording or when using the Ranorex Spy tool : this makes writing test script a lot easier. There are also interesting features such as imaging comparison, user friendly test reports or test script debugging and much more.

Scripts tests are actually .Net executables writtent in C# or VB.Net and Ranorex Studio IDE is based on SharpDevelop, a open source .Net IDE . It means using this tool requires some basic knowledge of .Net, which can discourage some people. On the other side, writing script tests on a .Net architecture makes it  possible to use specific .Net features or 3rd party libraries to integrate with NUnit or Microsoft Products like Visual Studio or Excel.

Digital news!

Are you as digitally addicted as we are? We can supply you with a regular dose of digital news. Simply sign-up, or click to Follow us online.

About the author

Josselin Lebret
Josselin Lebret

Java EE and Web Developer since 2002
Working at BI since August 2008