Flex 2 and Functional Testing – mx.automation classes

Posted on November 27, 2006 | 13 comments

In the days of Flex 2 beta there were some mx.automation.* classes that was the start of integrating Flex 2 with Mercury Quick Test Professional (QTP). These classes where pulled out of the Flex 2 release. At MAX I attended Alistair McLeod‘s presentation on “Increasing Efficiency and Quality with Flex Automation” and found out that the mx.automation.* classes will make it into Flex 2.0.1.

A good resource on this subject is a presentation made by Ram. K back in June 2006 called “Automated testing of Flex applications”. In this document there is a diagram on page 5 that shows a Testing Tool API box with Adapters inside it.

I am interested in how people are using QTP adapter and if there are plans for any other custom adapters (I have my own ideas in this area). If you are using QTP adapter or have more information about custom adapters please leave a comment or email at renaun renaun com.

  • http://fish37.livejournal.com Gregory Golberg

    This is definitely something I am looking for. Where can I get more information (and what about using some other tools rather than QTP?)

  • http://www.renaun.com Renaun Erickson

    When the release of Flex 2.0.1 happens I’ll hopefully have more information.

  • http://www.illusoft.com Pieter

    Hi Renaun,

    Do you already have any more insight to Functional Testing flex applications?

    Best Regards,


  • http://www.renaun.com Renaun Erickson

    Not at this time, I have some proof of concept stuff but it is too early to demonstrate anything.


  • http://www.sabre.com adam scierski

    hi! i am using qtp to test the flex application, but unfortunetly qtp don’t want to work with flex as much as i wanted to.

  • http://www.renaun.com Renaun Erickson

    Can you example the use case where QTP doesn’t work for you. You can email off the blog at renaun renaun com

  • adam scierski

    my e-mail: a.scierski@gmail.com.
    unfortunately i am unable to select option values from drop down list ( e.g. 1, 2, 3). i am unable to select values from Flex list by index also. If you have any solution please contact with me we can exchange our knowledge.

  • Ram


    I am trying to automate the Flex pages using QTP through discriptive programming but unfortuantely i am unable to do it,if you have any procedural document to automate Flex pages using QTP can you please send it to me.


  • Marco

    Hi Renaun,

    I’m using flex 2.0.1, QTP 9.2 and the Adobe Flex plug-in for QTP. Is still needed flex applications to import automation.swc, automation_agent.swc, automation_charts.swc and qtp.swc? There is very little updated information about automation flex apps using QTP.


  • Sunil

    Is TestComplete a good substitute for QTP?? It can test Flash also.
    Please suggest..


  • Pingback: James Ward - RIA Cowboy » Blog Archive » Matt Raible: Comparing JVM Web Frameworks

  • http://www.renaun.com Renaun Erickson

    @Suni I just recently came across TestComplete. I think since TestComplete relies on IAccessible that its somewhat limited compared to QTP. But it might be enough for your needs, but you have to implement your components or Flex’s components with the IAccessible interface. Which I don’t think all the components in the Flex Framework implement.

  • Abhe

    I am evaluating testcomplete for a flex application. Could you post some examples of how to modify flex code to implement the IAccessible interface so as to expose the objects to testcomplete.

  • http://www.renaun.com Renaun Erickson

    I haven’t confirmed this actually working myself but the idea is that AccessibilityProperties are what TestComplete will see. So something like this should work for you:

    var accessProps:AccessibilityProperties = new AccessibilityProperties();
    accessProps.name = “myTestCompleteName”;
    myUIComponent.accessibilityProperties = accessProps;

    Now in TestComplete when you click on the component it should say something like “myTestCompleteName” for the target name and you can use that in your scripts.