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
11 Responses to “Functional Testing Framework for AIR AJAX apps based on Selenium”
Leave a Reply

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 ? 
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.