Functional Testing Framework for AIR AJAX apps based on Selenium
My friends from the Romanian Adobe AIR team have been very busy lately. Marius and Alex have been working on, was to modifying Selenium so you can run automated / functional tests on AIR applications developed with HTML/JS.
To be honest, I am quite amazed about what they managed to pull off in so little time. And because we need your feedback, I have an archive ready for download here, so you can start playing with it in minutes. Here is what it is in ZIP:
- demo movies – two movies that show you the workflow supported for now
- sample tests – this is the interesting part. You have two applications and some tests files to test these applications with this framework. The first test uses a Selenium based model for dispatching UI events, the second uses a Java AWT robot to generate mouse and key events.
- selenium recorder – this lets you record your UI interaction with the application. Then with a little editing on the resulting test files you can create the test cases for your automated testing.
- selenium server – this is the heart of this framework. It acts as a proxy between the requests that are made from tests and the AIR application.
- readme.txt – for a quick start on trying the samples; this files describes how to create a Java project and run the tests from Eclipse as a JUnit Test Case.
- SeleniumWithAIR.pdf – the first draft of documentation for this framework, which includes the known issues.
It should work on Win and Mac, with Java 1.5 or newer and AIR SDK 1.1.
Here is a short explanation of how to quickly run the tests from the ZIP file:
- Download the ZIP, and unzip somewhere on your disk
- Create a system variable named ADL_EXE and set its value to the full path of the “adl” executable from your local AIR SDK

- Start the server: selenium/selenium server/runServer.bat

- Run the tests: selenium/sample tests/runTest.bat


Here is a snapshot of the Eclipse project to run the tests from the ZIP:
So, that’s it! Try these goodies and let me know what you think!
Comments
21 Responses to “Functional Testing Framework for AIR AJAX apps based on Selenium”
Leave a Reply






Android & AIR
PHP & Flex
w00t! unde trimit feedback?
please give me the feedback as comments to my post. thank you for time.
[...] Source [...]
[...] HTML/JS to build AIR Applications and wondering how to automate functional testing for your app? Here is some piece of news that might light your face. So in two words, the guys across my desk have [...]
I wish that “HTML/JS” part would have been written in bold or something. I am still waiting for something for those that are using AIR with Actionscript.
I think Mich0u posted without knowing an issue on running multiple tests on the same AIR application. Didn’t replicate as I’m still behind in learning BDD with JDave framework. I will catch up when the thread will grow :)
@Liviu
It depends on what you want to test in an AIR application. If you want to test user interaction and automate that you can chose any utility that records keystrokes and mouse clicks. Sure I don’t know many people that have professional tools such as QTP fully licensed, but there are tools that can be set to click and scroll for you even though your application is Flex, Actionscript or AIR. One such tool is AutoHotkey.
[...] HTML/JS to build AIR Applications and wondering how to automate functional testing for your app? Here is some news that might put a smile on your face. In few words, the guys across my desk have been [...]
I don’t know why but in time this post became a reference model, trying always to see if the comments are becoming more interesting, and maybe I’ll get smart in testing Flex/AIR applications. But I’m too much of an optimist. C’mon dudes and dudettes give some back, the tool above is really cool. On the other hand maybe you’ll give a try to Flash – Selenium or Fluint. This might become a great post where lots of testing tools for Flex and AIR are indexed while we are waiting for Jason Huggins, now that he is a Xoogler, to give us Selenium on steroids. I can’t wait to see some of that :) and then I can finally say that Selenium is the cure for Mercury poisoning… get it ? :D
This post can also be useful for those trying to make a project involving automation testing process promoted by Adobe Media Player Team Romania.
I know this seems off topic but can anyone knows any video with Jason Huggins keynote speech at GLSEC 2008. It seems like the next great thing in providing full visual on how the tests are going (you did it to by adding those Camtasia captures in the archive :). While I wait on that I can also point out such a tool which are helping us a lot in providing great quality feedback to our management and stakeholders. It’s called Jing and with it the proof of an error becomes more than mere words on paper :)
But that is just me. Any ideas on that? please share.
I realized that I didn’t stick to much to the topic of the post and didn’t gave more tools on AIR / Flex testing – blame it on my admiration of Jason Huggins work :) .
A really good start in beginning TDD on Flex or Coldfusion is Charlie Arehart presentation. It is also great to look at his site where he indexed around 700 tools that helps a lot when developing applications using Adobe products.
On testing tools since I mentioned Fluint it will be good for anybody to check FlexCover and get right amount of feedback on their code. :)
Looks like this tool is only for AIR written in Javascript&html. We hope to use this tool to test our AIR application written in Action Script. Does anybody know if this is doable?
thanks,Joe.
Hi,
We have been evaluating the tools selenium, flash selenium and selenium flex api for automating the functional testing of an flex application. We find the tools very promising, I tried to use this tool(seleniumforflex) for testing an AIR application using the same code that relies on the java scrpt interaction with the externalized methods of the selenium launched AIR application. I tried this tool to test our application(swf file) directly not an exe file wrapped in html. I was not successful with that and it is not recording the user interactions with the UI. My question is two fold:
1. How do we integrate this tool to test a AIR SWF with flash selenium?
2. If we cannot do the above, how do we record the test based on the user interactions with the UI.
Hope to get a reply soon. Thanks in advance.
–Srinu
I was very excited to see Adobe AIR Flex, until I discovered there are no viable automated testing products that will work with it. Somebody please prove me wrong. Adobe recommends mercury QTP, but the adobe at_API libraries MUST be compiled in with the AUT. That’s a problem for us and mercury won’t support it. FlexMonkey looked very promising, (no instrumentation required), but one promblem, doesn’t work with AIR. I’ve had very good luck using C#/UIAutomation and (aging) WinRunner, but neither on of them will work with AIR. Is anybody out there automating (ActionScript) AIR applications?
[...] 使用Selenium来对AIR AJAX 应用做功能测试的框架http://corlan.org/2008/08/15/functional-testing-framework-for-air-ajax-apps-based-on-selenium [...]
Hi
you can get more information about flex testing tool from here.
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/
Tools für das Testing des BackOffice-Admins…
Inhalt Einleitung Für das BackOfficeAdmininistrationswerkzeug werden derzeit drei Technologien von der SWE evaluiert (siehe EOCPS:MWC Backoffice GUI Technologieauswahl)…….
[...] Testing Framework for AIR AppsBy jaffamonkey on November 20, 2009 Functional Testing Framework for AIR AJAX apps based on Selenium : Mihai CORLAN [...]
A great idea though I could not even run sample test I keep encountering error – Browser not supported *air, with the list of supported browsers as -
#################################
Supported browsers include:
*firefox
*mock
*firefoxproxy
*pifirefox
*chrome
*iexploreproxy
*iexplore
*firefox3
*safariproxy
*googlechrome
*konqueror
*firefox2
*safari
*piiexplore
*firefoxchrome
*opera
*iehta
*custom
#################################
Which certainly misses *air as browser!
Is there any thing I could do rectify it?
I could provide feedback only once I could be in position to use it.
Looking like this tool is written for AIR only using Javascript and also html. I will test this tool shortly and give you feedback. Hope this tool works well for me.
Hi, I explored the tool and it looks good.
Can i know when will it be available publicly.
And whom to contact.