QTP and Adove Flex working with containers

Posted on Feb 2 2008 - 1:54am by Raj

Testing Rich internet applications developed in Flex / Adobe Flash using Quick Test pro – using containers.

Working with containers
In general, Mercury QuickTest Professional (QTP) reduces the amount of detail about nested controls in the testing script. It removes containers that have no impact on the results of the test or on the identification of the controls from the script. This applies to containers that are
used exclusively for layout, such as the HBox, VBox, and Canvas containers, except when they are being used in ViewStack, TabNavigator, or Accordion containers. In these cases, they are added to the hierarchy to provide navigation.
When using nested containers, you should be wary of ID conflicts. It is possible for containers with multiple tabs (such as Accordion and TabNavigator containers) to have the same label on more than one tab. These containers derive their IDs from the tab labels, therefore, there
could be overlapping IDs.
QTP does not record layout containers in the scripts unless you execute an event on that container. This keeps the test objects from becoming too deeply nested, which makes the testing scripts less readable.

Working with Repeater objects
Repeater objects are visible in the QTP object hierarchy and scripts, and contain the child objects that they have created. In an actual Flex application, these child objects are children of the main container and not the Repeater object. In QTP table checkpoints, both models are
accounted for; the child objects are visible as children of the container and the Repeater object.
Working with data-driven and List-based controls
To work properly with automation, a custom item renderer object for a List-based control must be data-driven. For generating table checkpoints, data is pushed onto a single item renderer, and then values are queried. If an item renderer is not data-driven, the values generated are incorrect.
If data that is displayed in a List-based control changes across tests, you should use an indexbased approach for recording. Value-based recording fails in this situation.

About the Author

Leave A Response