QTP LR JSP ORACLE

Install and Configure Flex Automated Testing

上一篇 / 下一篇  2008-03-26 13:56:15 / 个人分类:QuickTestProfessional

Install and Configure Flex Automated Testing

To use Flex Automated Testing, you must install Flex Builder 3 Professional. You cannot use Flex Automated Testing with only the Flex 3 SDK. If you do not have a Flex Builder Professional license, your test scrīpts are limited to 30 actions. If you exceed 30 actions in a test without the Professional license, you will receive a warning that your license is not present.

Flex Automated Testing SWC files are installed by default with Flex Builder 3. They are located in the /frameworks/libs directory with the other SWC files. You can begin using Flex Automated Testing and build your own custom agents without any further installation.

To use run-time automated testing (recommended):

  1. Open a command prompt.
  2. Navigate to theflex_builder_root/sdks/3.0.0/templates/automation-runtimeloading-files directory.
  3. Execute the build.bat file. This compiles the runtimeloading.mxml file into a SWF file.
  4. Copy the runtimeloading.swf and RunTimeLoading.html file to your web server. Copy the Flex application that you want to test to this server as well (the application need not be compiled with automation libraries).
  5. Request the RunTimeLoading.html file and pass your Flex application as the automationswfurl query string parameter; for example:
    http://localhost/RunTimeLoading.html?automationswfurl=MyApp.swf

To compile your applications with static automation support:

  1. Start Flex Builder.
  2. Create a new Flex Project.
  3. Select your new Flex project in the Navigator.
  4. Select Project > Properties > Flex Compiler.
  5. In the "Additional compiler arguments" field, enter the following:
    -include-libraries "flex_builder_dir\sdks\3.0.0\frameworks\libs\automation.swc"
     "flex_builder_dir\sdks\3.0.0\frameworks\libs\automation_agent.swc"
     "flex_builder_dir\sdks\3.0.0\frameworks\libs\qtp.swc"
     "flex_builder_dir\sdks\3.0.0\frameworks\libs\automation_dmv.swc"

    The -include-libraries compiler option is relative to the Flex Builder installation directory; the default on Windows is "C:\Program Files\Adobe\Flex Builder 3\".

  6. Click the OK button to save your changes and OK to close the project Properties dialog box.
  7. Compile your Flex application.

    Examples and documentation for using custom agents can be found atCustom Agents.

Flex 3 Plug-in for HP QuickTest Professional
To use Flex Automated Testing with the Flex 3 Plug-in for HP QuickTest Professional (formerly Mercury QuickTest Pro), you must perform additional steps. The rest of this section describes how to install and use the Flex 3 Plug-in for HP QuickTest Professional.

Requirements for Using the QTP Plug-in
To test applications with Flex Automated Testing and the QTP agent, you must install the following:

  • Mercury QuickTest Professional 9.1 (no support for Smart Identification), available from Mercury
  • Mercury QuickTest Professional 9.2 and patch 1701 or later if you want Smart Identification support
  • Adobe Flex 3 Plug-in for Mercury QuickTest Pro
  • Microsoft Internet Explorer, version 6 or later
  • Flash Player ActiveX control, version 9.0.28.0 or higher

Installing the Plug-in
This section describes the steps necessary for a QC testing professional to configure QTP to work with Flex applications. You must install QTP and the plug-in.

To install QTP:

  1. Install Flash Player 9 ActiveX control (9.0.28.0 or higher) for Microsoft Internet Explorer. This is currently the only supported browser/player.
  2. Install QTP 9.1 if you do not require support for Smart Identification. If you want to use Smart Identification, install QTP 9.2 and patch 1701. You must get QTP 9.1 from Mercury.
  3. If you are using Mercury QTP on Microsoft Windows Vista you need to turn off the User Account Control (UAC) feature. Instructions to turn off UAC are availablehere
  4. Restart your computer.

To install the Flex 3 Plug-in for Mercury QuickTest Pro:

  1. Run theflex_builder_root/Installers/QTP_Plugin_Installer.exe.
  2. Start QTP.
  3. Close QTP.

In addition to the plug-in's DLLs and XML files, the plug-in installer includes the following in the installation directory:

  • /demo — Contains a Flash movie that describes the basics of using the plug-in. Be sure to enable audio on your computer.
  • /Uninstall Adobe Flex 3 Plug-in for Mercury QuickTest Pro — Contains the uninstaller.

Using the Plug-in

  1. Start QTP again after installing the plug-in. The Add-in Manager lists the Flex plug-in.
  2. Select the Flex plug-in in the Add-in Manager.
  3. Select New > Test and click the Record button.

NOTE:Flex application testing with QTP currently supports only Microsoft Internet Explorer with the ActiveX Flash Player.

For more information on these tasks and using QTP to test Flex applications, seeTesting with QTP.

For information on the operations and properties of Flex objects in QTP, seeQTP Object Type Information.

Samples for Automated Testing
Sample custom agents are available atCustom Automation Agents.

An application ready for testing with QTP can be found atFlexstore AT. This sample can be used to test if the QTP plugin installation was successful.

An example for automating custom components can be found atAutomating Custom Component.

Using automation with the Adobe Flex Component Kit for Flash CS3
You can create Flex controls, containers, skins, and other assets in Flash CS3 Professional, and then import those assets into your Flex application. When you want to automate an application that uses such assets, you must include the automation_flashflexkit.swc library.

If you are using run-time loading, re-compile the runtimeloading.swf file by using the build.bat file inflex_builder_root\sdks\3.0.0\templates\automation-runtimeloading-files\. The batch file includes the necessary libraries.

If you are compiling automation support into your application, add the automation_flashflexkit.swc to your include-libraries compiler option. This is in addition to the other automation SWC files. The SWC files are located in theflex_builder_root\sdks\3.0.0\frameworks\libs directory.


TAG:

 

评分:0

我来说两句

日历

« 2024-05-25  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 72706
  • 日志数: 117
  • 图片数: 1
  • 文件数: 1
  • 建立时间: 2007-05-07
  • 更新时间: 2011-06-16

RSS订阅

Open Toolbar