Showing posts with label Flex Testability. Show all posts
Showing posts with label Flex Testability. Show all posts

Sunday, May 17, 2009

FlexUISelenium for testing Flex UI with Selenium

Due to the high number of requests for making FlashSelenium directly test the UI components of a Flex application, I got involved in a new open source project: flex-ui-selenium. The new component, FlexUISelenium, is used with Selenium RC for testing Flex UI interactions.

FlexUISelenium is an extension to the Selenium RC client driver that enables the Selenium RC client drivers to interact (and test) the Flex UI components and methods of the Flex application.

Here is a sample test code using FlexUISelenium:


@Test
public void sumForValidNumbers() {
flexUITester.type("2").at("arg1");
flexUITester.type("3").at("arg2");
flexUITester.click("submit");
assertEquals("5", flexUITester.readFrom("result"));
}


FlexUISelenium uses Selenium RC, Flash Selenium and Selenium Flex API. FlexUISelenium uses FlashSelenium for enabling the communication of Selenium RC client with the Flash application (swf). And Selenium Flex API exposes all the UI components of the Flex application which are built with SeleniumFlexAPI.swc.

The first public release has just been uploaded to the project page.

Enjoy it!

Thursday, July 3, 2008

Selenium Testing Flex

At the end of 2007, I was researching functional test tools (preferably open source) for testing Flash or Flex applications.

As I was familiar and very satisfied with Selenium for testing Web Applications I decided to put some effort on trying to use Selenium for driving my Web Flex Application functional tests.

With some work (in fact not too much work—kudos to Selenium) I had a working solution and was successfully using Selenium to test a deployed Web application with a Flash component (SWF).

As a result of this effort, Flash-Selenium has been created and open sourced.

http://code.google.com/p/flash-selenium/

Also a recent article on adobe.com describes Flash-Selenium usage in more details:

http://www.adobe.com/devnet/flash/articles/flash_selenium.html