未来已来

配置QTP录制flex2.0.1技巧

上一篇 / 下一篇  2008-07-08 13:16:00 / 个人分类:自动化测试

   Flex 是 Macromedia发布的presentation server(展现服务),它是java web container或者.net server的一个应用,根据.mxml文件(纯粹的xml描述文件和actions cript)产生相应得.swf文件,传送到客户端,由客户端的flash player或者shockwave player解释执行,给用户以丰富的客户体验。
  Flex就像Flash一样, Flex能够制作出可以被Flash Player播放的SWF文件。但是,Flex主要是开发者(程序员)的工具,并且开发Flex应用程序的方式和开发Flash RIA(Rich Internet Application,富互联网应用程序)的方式完全不同。所有的Flex开发都基于一个Flex开发框架,该框架为你提供可重复使用、可扩展的UI组件、数据获取服务和事件处理模块等等

关键信息:

1. must have QTP 9.1, flex 2.0.1, IE 6+, and install the QTP plug-in.

2. must recomiple the app in flex 2.0.1 with automation testing libraries.

3. must put the swf and html file to the QTP machine.

4. When testing, access the html(not the swf) file from a browser via web server. don't open the html from the file system.

  • Before you start to test your flex app with QTP, you have to make sure you have all the necessary software installed and configured correctly.
  1. Make sure you installed QTP 9.1, not 9.0.
  2. Make sure you installed flex 2.0.1 , and your flex app should be recompiled using flex 2.0.1.
  3. Make sure you have installed the QTP plug-in. You can download it from ourwebsite. You will need to register to login the page first. After you login into the page, scroll down and you will see "Flex Automation Package". From there you can download Flex_Automation.zip. After you unzip the zip file, you can see QTP_Plugin_Installer.exe. Run that exe file and that will install the plugin.Note, To verify if you have installed the plug-in or not, go to your registry, and search for entry ofTEAPluginIE.dllandTEAPluginQTP.dll. If those dlls are not in the registry, then your plug-in has not been installed correctly.
  • If you have above installation and configuration, but the QTP does not record the flex app, then check the following:
  1. QTP plug-in is only supported on IE 6+, you need to make sure your browser is using IE 6 or higher version. And your flash player must be version 9.0.28. or higher. To verify your flash player version, request the following link from your testing browser: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507
  2. The flex app you are going to test with QTP must be prepared for automation. You need compile your app with automation testing libraries, such as automation.swc, automation_agent.swc, and qtp.swc, etc. You can compile this via Command-line compiler or flex builder. If you have compiled your flex app in flex 2.0.1 already, and want to Test run-time loading, then you can compile RunTimeLoading. Please follow the instruction step by step describedhere.
  3. If you request your flex app from a browser, you have touse the html wrapper file. Do not accessing the swf directly,it needs to be loaded from an object tag with an ID. You can open the wrapper or the SWF file from the file system, but it is not a recommended practice. You should try to deploy the SWF file to a web server and request the html wrapper through HTTP from the server. See page 13 ofTesting Flex Applications with Mercury QuickTest Professionalfor more details.
  • If you still have trouble getting up and running with Flex QTP plugin, you can create a log by following the steps below:
  1. Go to the mercury installation/bin directory say: "C:\Program Files\Mercury Interactive\QuickTest Professional\bin" and run MicLogSetting.exe .
  2. Select the log settings as: Level: MicLogLevelDebug2 Folder:C:\Program Files\Mercury Interactive\QuickTest Professional\ Selected Categories:LogCatPackTEA
  3. Run QTP and record a flex application say flexstore.html
  4. A log file would have been generated like C:\Program Files\Mercury Interactive\QuickTest Professional\MicLogFile_QTPro_pid1912_11_32_32.html
  5. Check whether you are seeing the following in the log: "Read Flex environment and matching ProgId TEAPluginQTP.TEAFlexAgentQTP.

TAG: 自动化测试

测火燎原--态度决定质量 引用 删除 ppent   /   2008-07-08 16:41:38
好文章
 

评分:0

我来说两句

Open Toolbar