RIA applications are generally Flash based application that uses Action scripting where as HTML applications uses JavaScript or VB script for browser based logics. Generally a website is either build on 100% RIA or 100% HTML. There are many testing tools available online for testing RIA and HTML application individually.
In a typical scenario developers may decide to create a website that is a hybrid of RIA and HTML for the reason both these technology has certain bright and dark side of the usage. For example: For security reasons a coder may decide to use HTML but for cool user interface one may think for RIA. A web application developed using Flex Builder though seems to be a complete RIA, but still there exists a HTML wrapper on top of the Flash object. This gives flexibility to the coders to distribute the browser based logic between Flash object and the HTML wrapper. In a hybrid model it becomes more challenging to write an automation script to test the web application as very few available tools (eg. QTP) gives an integration support between RIA and HTML. This document targets to streamline the basics of web application testing.
Many tools are available that provides fancier way to record and playback. Most of these try to simulate the mouse and keyboard behaviors over the screen grids. However this logic has big disadvantage with web application as it may fail if the coordinates of the control are changed or with browser size or position variation. This needs heavy maintenance of the scripts.
Logic behind HTML Testing
HTML Testing is based on component identifiers rather than their coordinates. Typically all tools have a browser based plug-in which is capable of executing JavaScript functions or statements. The plug-in is driven by test script written in tool supported language. Some of the tools that are capable of doing HTML Testing are detailed below.
1. Selenium:
2. Silk Test:
Logic behind RIA Testing
Most of the tools available today for testing RIA applications have common Logics underlying. The common thing in all logic is an agent that associates itself with the Flash object. The agent itself is a Flash object and is required to translate the test scripts (in supported language) to perform required function on the target Flash object. However the agent needs to be ready before the Flash object is loaded. The logic behind RIA Testing can be segregated into following approaches.
- Associating Agent while compiling RIA Application:
In this approach it is needed to include some additional references (available from Testing tool) while compiling the application. By doing this an agent is getting associated to the Compiled Flash object (swf). While running the test, the automation tool tries to communicate with the agent and runs the scripts. The agent takes the instructions from the tool and performs the required action on the Flash object.
This logic can be seen with RIATest, Silk Test tools.
This approach has the disadvantage of altering the application compile process. This will have overhead of including and removing references while moving from build environment to production environment.
- Calling Flash Object in a Query string:
In this approach the automation tool generally provides a launcher html file. This file holds the agent. It takes the swf location in the Query string. The html file acts as a wrapper around swf file. This approach is again seen with RIATest and Silk Test.
This approach takes into consideration of just the Flash object neglecting actual wrapper of it. In case the web application is built using Flex builder and the browser logics are distributed across JavaScript and Flash object s.a. ‘Handling popup window using javascript when a Flex button is clicked’ then this approach will fail.
The best automation tool that can deal under hybrid model is the one which can communicate between action script and the JavaScript.

No comments:
Post a Comment