19
Lohika Flex Automation. Tools comparison Dmitry Irzhov 12. 17. 2011

Flex automation. tools comparison

  • Upload
    alex

  • View
    24

  • Download
    5

Embed Size (px)

DESCRIPTION

Comparison of tools to be used for Flex automation QA with Selenium.

Citation preview

Page 1: Flex automation. tools comparison

Lohika

Flex Automation. Tools comparison

Dmitry Irzhov12. 17. 2011

Page 2: Flex automation. tools comparison

• We define the most appropriate tool to automate flex/flash applications

• Based on a set of utility functions, ability to describe the controls, we define some of the tools more versatile and less costly for automation

Goal

Page 3: Flex automation. tools comparison

• There are paid tools for automation the flash / flex applications: RIATest, TestComplete, SiktTest, Rational Functional Tester, HP QTP, as well as free: FunFX, FlexMonkey, SeleniumFlex, FlexPilot

• Flex / Flash API extends

• Versioning browsers often grows

Current Situation

Page 4: Flex automation. tools comparison

• Cross-browser compatibility

• Ability to describe any control with any nesting

• Availability of documentation

• Supporting flex 3&4

• Ability to change / add a set of tool functions

Requirements for the tool

Page 5: Flex automation. tools comparison

Architecture

Flex/FlashApplication

ExternalInterface

Monkium PilotSFAPI

WebDriver

Selenium Server

Test Script

Functions of the tool

ALP

Page 6: Flex automation. tools comparison

Locators

• Monkium generates monkeyId for elements which do not specify automationName or id

• Monkium not support chain * (can be described by Container Property / Value)Pilot Monkium SFAPI

id + + +

automationName

+ + +

Property Value

+ + +

Generated Id

- + -

chain + +/- +

Page 7: Flex automation. tools comparison

Documented functions

• A set of Monkium functions can be found only if write commands in the FlexMonkey

• A set of FlexPilot functions can be seen on the developer's site

• A set of SFAPI functions is described as FlexPilot in the user-extensions.js file

Note: SFAPI contains the largest set of commands

Page 8: Flex automation. tools comparison

PopUpButton

Action Pilot Monkium SFAPI

click + + +

open - + -

• PopUp arrow button is not accessible

• Need to use native open() method

Page 9: Flex automation. tools comparison

Edit Field

SFAPI

• document.getElementById('testApp').getFlexProperty('id:ta','text');

Pilot

• document.getElementById('testApp').fp_getPropertyValue({'id':'ta','attrName':'text'});

Monkium

• document.getElementById('testApp').getForSelenium('<VerifyProperty value="ta" propertyString="text" expectedValue="sample" propertyType="equals" prop="automationName"/>', '');

Action Pilot Monkium SFAPI

click + + +

type + + +

getText + + +

Page 10: Flex automation. tools comparison

ComboBox

Action Pilot Monkium SFAPI

select + + +

type + + +

getText + - +Pilot

• fp_getPropertyValue({'chain': 'id:cardCmb/className:ComboBoxSkin/className:TextInput', 'attrName':'text'}); - unable to use selectedIndex.label

Monkium

• getForSelenium('<VerifyProperty value="cardCmb" propertyString="selectedIndex.label" prop=”id"/>', '');

SFAPI

• getFlexText('id:cardCmb.selectedItem','');

Page 11: Flex automation. tools comparison

DropDownList

Action Pilot Monkium SFAPI

select + + +

getText + + +

Pilot

• fp_getPropertyValue({'chain':'id:list1/className:*/className:Label', 'attrName':'text'}); - can be returned non-selected label

Monkium

• getForSelenium('<VerifyProperty value=\"list1\" propertyString=\"selectedItem.label\" prop=\"automationName\"/>', ''); - return error on non-selected contro

SFAPI

• getFlexText('id:list1.selectedItem',''); - return wrong selection on non-selected control

Page 12: Flex automation. tools comparison

List

Action Pilot Monkium SFAPI

select + - +

getSelection + - +

Pilot

• document.getElementById('testApp').fp_select({'id':'myList', 'index':'1'});

Monkium

• Unable to select and get selection if List is with ItemRenderer

Page 13: Flex automation. tools comparison

Advanced Grid

• Monkium has a small set of commands (HeaderClick, Select)

• SFAPI has a variety of methods (getFlexDataGridUIComponentLabel, getFlexDataGridCell, getFlexDataGridRowCount, etc.)

Page 14: Flex automation. tools comparison

Tree

Action Pilot Monkium SFAPI

open - + -

select - + -

Monkium

• <UIEvent command="Open" value="myTree" prop="automationName"><arg value="Inbox" /></UIEvent>

• It is not possible to automate custom controls in tree nodes (such as RadioButton or CheckBox)

Pilot

• No methods to work with Tree, but can be implemented using separate controls of Tree

Page 15: Flex automation. tools comparison

Context Menu

Pilot

• fp_rightClick({'id':'testApp','contextMenuIndex':'1'}); - locator should be the root object of application

Action Pilot Monkium SFAPI

rightClick + - -

Page 16: Flex automation. tools comparison

ScrollingPilot

• fp_click({'chain':'id:dg/className:VScrollBar/className:Button/className:ScrollBarDownButtonSkin'});

Monkium

• playFromSelenium('<UIEvent command="Scroll" value=\"dg\" prop=\"id\"><arg value="0"/><arg value="2"/></UIEvent>',"");

There are many ways to solve the issue for List control with ItemRenderer:

• Use ensureIndexIsVisible(index) or call Event.CHANGE for ScrollBar

• Setting list.layout.verticalScrollPosition

• Setting ScrollBar.value

Action Pilot Monkium SFAPI

Grid Scroll + + +

List Scroll with Renderer -* -* -*

Page 17: Flex automation. tools comparison

FlexMonkium Disadvantages

• After performing a dozen commands you can not continue running (only after you restart the application) http://www.gorillalogic.com/forumpost/1011

• The command set can be seen only in the source code or in FlexMonkey

• No support for chain or XPath (Container Property, Container Value)

Page 18: Flex automation. tools comparison

FlexPilot Disadvantages

• Small set of commands, but they are atomic and based on them can be implemented the missing commands

• The project is poorly developing

• No support for XPath

Page 19: Flex automation. tools comparison

Resources

SFAPI

• http://code.google.com/p/sfapi/

FlexPilot

• https://github.com/mde/flex-pilot

FlexMonkium

• http://www.gorillalogic.com/flexmonkium

FlasInspector

• https://addons.mozilla.org/ru/firefox/addon/flashinspector-194381/