3 Replies Latest reply on Jan 12, 2007 3:06 PM by Brian Knorr

    QTP 9.0 compatibility and automation testing

    RabidFly Level 1
      Our project is currently faced with having to build an automation testing framework for our flash games. We are currently using Flash 8, flex, and ActionScript 2, but we are wrapping everything for easy transition into Flash 9 and AS 3 as soon as it is released.

      The challenge with most industry products like QTP (mercury) is that they cannot programmatically interpret Flash UI elements. QTP 9.0 professes to have compatibility to Flex 2 through MXML, but we are not using MXML because it severely limits the productivity of our designers.

      Our flash framework is abstracting all interactive visual elements into a component library, so that all versions of a particular game are forced to use the same UI element IDs (for example: the spin button for a slots game). This allows us to implement automation testing scripts that refer to that button ID and not the bitmaps x,y location. So, for any variation of this game, including localization and branding, i have the luxury of using a single script to do my functional testing.

      Here is the problem however. What technology exists out there that will allow me to do this? The flash community is huge and i find it hard to believe that my research has yielded very little on this topic. I've come across things like MSs Active Accessibility, but i'm not convinced QTP 9.0 can implement this interface to read Flash UI elements. I have looked at an open source tool called AutoTestFlash, but i'm not confident it is robust enough. I've also been told that Adobe provides an add-on for QTP 9.0 to interface with Flex, but i can't seem to find it anywhere.

      Anwyay, what are you guys using to test your flash applications? Have you automated these tests? Is it bitmap x,y based, or have you attempted to do what i am proposing above? If so, what technologies exist out there in the internet ether that can help us all save time in the QC grindstone? :)

      Thanks in advance,

        • 1. Re: QTP 9.0 compatibility and automation testing
          mpicotte Level 1
          We are currently working on a deployment of a portal application this is using Flex and are unable to use QTP to do any automated scripting. Did you ever get any response as to any other applications to test your flash applications?

          • 2. Re: QTP 9.0 compatibility and automation testing
            nitefoll Level 1
            I'd be interested in this also.
            • 3. Re: QTP 9.0 compatibility and automation testing
              Brian Knorr Level 1
              We have also been looking for a way to do automated functional testing of Flex applications, but there doesn't seem to be anything available. We certainly will not use QTP... mostly for two big reasons: 1) It's not free 2) It's record and playback.

              Right now we are looking to do something similar to what was described in the original post. Basically create a library that provides Flex DOM navigation, ability to perform user actions, and a strategy to handle asynchronous calls. A library like this could easily be used within a framework like asunit or flexunit. Here is some pseudo code that sorta give you the idea on where we are headed:

              //Find the button by id
              var button:Button = findById("searchButton") as Button;
              //Simulate a user click

              //Clicking the button will call a service that fetches data and populates a data grid
              //Since this is asynchronous you can wait until the event "dataChanged" has fired and continue your test script
              var grid:DataGrid = findById("resultGrid") as DataGrid;
              wait("dataChange",grid, function() {
              assertTrue("grid should have 5 rows", grid.rowCount == 5);