Adobe Flex 3 Help

Providing meaningful identification of objects

When working with testing tools such as QTP, a QC professional only sees the visual representation of objects in your application. A QC professional generally does not have access to the underlying code. When a QC professional records a script, it's very helpful to see IDs that help the tester identify the object clearly. You should take some time to understand how testing tools interpret Flex applications and determine what names to use for the test objects in the test scripts.

In most cases, testing tools use a visual cue, such as the label of a Button control, to identify the control in the script. Sometimes, however, testing tools use the Flex id property of an MXML tag to identify an object in the test script; if there is no value for the id property, testing tools use other properties, such as the childIndex property.

You should give all testable MXML components an ID to ensure that the test script has a unique identifier to use when referring to that Flex control. You should also try to make these identifiers as human-readable as possible to make it easier for a QC professional to identify that object in the testing script. For example, set the id property of a Panel container inside a TabNavigator to submit_panel rather than panel1 or p1.

In some cases, agents do not use the id property, but it is a good practice to include it to avoid naming collisions or confusion. For more information about how QTP identifies Flex objects, see Testing Adobe Flex Applications with Mercury QuickTest Professional.

You should set the value of the automationName property for all objects that are part of the application's test. The value of this property appears in the testing scripts. Providing a meaningful name makes it easier for QC professionals to identify that object. For more information about using the automationName property, see Setting the automationName property.