Adobe Solution Partner

February 15, 2007

How do I automate testing of Flex applications?

Filed under: Flex & Flash — Tags: , , — Nat Papovich @ 3:44 pm

A few of the Webappers had a rousing discussion about testing, specifically the various kinds of testing, the various roles involved in testing and the various technologies used in testing.

For my part, I’ve been investigating Selenium, but “doh!” I can’t use Selenium for testing Flex apps. Or can I? What about the Flex-Ajax bridge? What’s the going rate for Mercury QuickTest Professional?

Obviously I can do unit testing with CFCUnit, but I’m looking for build-time/integration testing to automate some of the QA process.

Any suggestions?

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Technorati
  • TwitThis

11 Comments »

  1. Off the cuff, it may be possible to port JSUnit or similar Javascript testing frameworks to AS3. Then, it’s a matter of architecting your app such that you can test controllers/models with the unit testing framework. For doing this at build-time, you’d need the Flex app to detect some sort of parameter that tells it "run the unit tests". Then, you could fire up the Flex app using the standalone player. For full automation, the app would need to emit the test results via HTTP or something to a server for logging purposes.

    Comment by Mark Murphy — February 15, 2007 @ 12:00 am

  2. ASunit has existing for a while. I doubt it will suit all of your needs. http://www.asunit.com/

    And Adobe Labs has FlexUnit.
    http://code.google.com/p/as3flexunitlib/

    If you use a Cairngorm, it’s useful to have a stub delegates to fake interaction with the server, or log interactions with the server. The same goes for the Controller(s).

    All in all, I really don’t know the best way to go.

    Comment by Paul — February 15, 2007 @ 12:00 am

  3. also i might add that coming from cf, testing a flex UI seems to involve some pretty fierce mental gymnastics. i’d certainly appreciate any resources on design, etc. testing that anybody might offer. i sometimes feel like a caveman ;-)

    Comment by paulh — February 15, 2007 @ 12:00 am

  4. Maybe check out the automation framework for Flex 2. I haven’t had the time to explore, but we had a quick discussion about it the other day and decided that we’ll need to look into it as a custom testing possibility. But, like I said I haven’t had the time to actually check it out.

    Comment by John Crosby — February 16, 2007 @ 12:00 am

  5. I know I can "end" the testing at the Flex/web service facade layer, making sure the right data is coming back from ColdFusion, but I’m still totally unsure how to go about testing that the entire Flex side does what it’s supposed to do. Maybe that combined with testing the ActionScript (asunit) is sufficient?

    Comment by Nat Papovich — February 16, 2007 @ 12:00 am

  6. Do you use a framework? With a little bit of experience, cairngorm makes it’s fairly easy to hook into various points in the lifecycle of a user gesture. I’m sure this is true for other frameworks, too. Cairngorm is simple and polished. I’d recommend it over rolling your own. I wish I started using is years ago.

    Comment by Paul — February 16, 2007 @ 12:00 am

  7. hey,
    have you tried the mx.automation ?
    may be it can help

    Comment by Alex — May 30, 2007 @ 12:00 am

  8. I have not, thanks Alex.

    Comment by Nat Papovich — June 4, 2007 @ 12:00 am

  9. If you are interested in GUI testing of Flex applications have a look at the upcoming RIATest testing tool at http://riatest.com

    Comment by Tigran Najaryan — December 13, 2007 @ 12:00 am

  10. have a look at http://sourceforge.net/projects/seleniumflexapi/

    This allows automation of functional testing for Flex applications using selenium

    Comment by Fergal — June 19, 2008 @ 12:00 am

  11. Hi Folks,

    I got this two automate flex testing tool. check the link below.

    http://www.rsdhariwal.com/2009/07/30/flex-ui-selenium-for-flex-application-testing/
    http://www.rsdhariwal.com/2009/07/29/testing-tool-for-flex-application/

    I hope it helps.

    Comment by Guruvansh — August 12, 2009 @ 2:42 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

 

Server Down?

Maximize Web application uptime by drawing upon Webapper's years of experience tuning and stabilizing many of the world's largest ColdFusion Web applications. Contact us today!