About the Flex installed testing files
The Flex support for QTP requires that you install two ActiveX plug-ins on the testing
machine. These plug-ins provide the necessary communication layer between Flex and QTP.
One plug-in runs inside of QTP, and the other runs inside the browser. The browser plug-in is
signed, and is designed to run in Microsoft Internet Explorer 6 on Windows only. Together,
these plug-ins ensure that Flash Player and the Flex framework can send the appropriate script
interactions to QTP during record mode.
Similarly, the plug-ins provide the mechanism for QTP to send script commands to the Flash
Player and Flex during playback. The browser plug-in uses the Flash Player
flash.external.ExternalInterface class and, therefore, requires the correct security context for
flash.external.ExternalInterface to run. If the SWF file runs from a web server, the Flash
Player automatically enables flash.external.ExternalInterface. If the SWF file runs from a local
file system, the SWF file must be trusted for flash.external.ExternalInterface to be enabled and
for the browser plug-in to work properly. If the plug-ins have problems loading, the cause is
written to the Flash Player debug log file.
About the testing environment
Flex component names reflect the nature of the component. For example, a button is a
Button control in the Flex programming environment. In the testing environment, the name
of each testable control is prefixed with Flex; for example, a Button control is known as
FlexButton in the QTP scripts. This prevents controls from different types of applications
from being confused in your scripts.
All visual Flex components can be scripted in your quality control tests. Most of their
properties and methods can be recorded and then played back. Each method stores a certain
number of properties.
When you create a test for the first time, notice that visual controls are usually referenced
inside containers. Not all containers that are used by Flex programmers are reflected in the
testing environment. For example, a set of buttons might be inside a horizontal box container
(or HBox), but that HBox control might not show up in the test script. Restricting the
controls in the scripts makes the scripts easier to read and keeps the hierarchies as short as
possible without losing detail.
The tea.html document includes a complete list of Flex components that you can test. You
can also view the testable methods and properties of these components in that document.
Introduction to the testing process
7
Need help?
Do you have a question about the FLEX 2-TESTING FLEX APPLICATIONS WITH MERCURY QUICKTEST PROFESSIONAL and is the answer not in the manual?
Questions and answers