• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

QTP的Delphi插件扩展开发

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

 

Delphi自动化测试

http://www.cnblogs.com/testware/archive/2010/10/11/1847746.html

 

1、安装Delphi插件

2、QTP的delphi插件安装后,还需要对被测程序进行配置才能正常使用,方法如下:
You must perform the following steps for each application that you want to test.
To link to the MicDelphiAgent.pas module:
1.        Add the <QuickTest Professional Installation folder>\dat\Extensibility\Delphi folder to your Delphi project search path or copy the contents of the <QuickTest Professional Installation folder>\dat\Extensibility\Delphi folder to your project folder.
2.        Add MicDelphiAgent to the Uses section of your application's project file (project.dpr) as shown in the example below:
program flight;
uses
       MicDelphiAgent,
       Forms,
       Windows;
($R*.RES)
begin
       Application.Initialize
       Application.Title :='Flight Reservation';
       Application.Run;
end.
3.        Compile your Delphi project.
Note: If your application includes the TwwDBGrid from InfoPower, you must add support for this grid as described in Configuring Support for TwwDBGrid.

 

Configuring Support for TwwDBGrid  
If your application includes the TwwDBGrid from InfoPower, follow the following instructions to enable support for this grid.
1.        Add MicWWSupport to the Uses section of your application's project file (project.dpr) after MicDelphiAgent, as shown in the example below:
program flight;
uses
       MicDelphiAgent,
       MicWWSupport,
       Forms,
       Windows;
($R*.RES)
begin
       Application.Initialize
       Application.Title :='Flight Reservation';
       Application.Run;
end.
2.        Recompile your application.
You are now ready to create and run tests on Delphi applications.


注:QTP10需要装QTP_00591.EXE补丁,不装的话能识别出Delphi控件,但是录制不下脚本,OR中属性也缺少Delphi_name.(测试环境Windows Server2003、Delphi6)

QTP11则没问题


3、插件扩展开发

部署方法:
To deploy the toolkit support set that you create, you must place the XML files in specific locations within the QuickTest installation folder. The following table describes the appropriate location for each of the toolkit support files:

a.Test Object Configuration file
<QuickTest installation folder>\dat\Extensibility\Delphi
<QuickTest Add-in for Quality Center installation folder>\dat\Extensibility\Delphi
(Optional. Required only if QuickTest Add-in for Quality Center is installed)
 
b.Toolkit Configuration file
<QuickTest installation folder>\dat\Settings 
Icon files for custom test object classes (optional)  The file can be a .dll or .ico file, located on the computer on which QuickTest is installed, or in an accessible network location.
Specify the location in the test object configuration file. 
Help files for the test object classes (optional)  Must be a .chm file, located on the computer on which QuickTest is installed.
Specify the location in the test object configuration file. 


Compiling Your Extensibility Code
If you developed an extensibility Delphi unit, you must compile the application you are testing with the QuickTest Professional Delphi Add-in precompiled agent and with your extensibility unit. To do this, perform the following steps:

Add the <QuickTest Professional Installation folder>\dat\Extensibility\Delphi folder to the search path of the application's project or copy the contents of the <QuickTest Professional Installation folder>\dat\Extensibility\Delphi folder to the project folder.
Add MicDelphiAgent to the Uses section of your application's project file.
If your application includes the TwwDBGrid from InfoPower, add MicWWSupport to the Uses section of your application's project file after MicDelphiAgent.
Add the location of your extensibility code to the search path of the application's project or place your file in the project folder.
Add the name of your extensibility unit to the Uses section of your application's project file.
Compile the Delphi application project.

 

 

Delphi2006 Tabs 控件的插件扩展开发实例下载:

https://files.cnblogs.com/testware/QTP_Delphi2006_Ext.rar

 

 

 

TIB自动化测试工作室提供各类Delphi插件扩展开发的培训和服务,欢迎联系咨询!

 

 

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
RRT路径规划算法(matlab实现)发布时间:2022-07-18
下一篇:
MATLAB命令大全(转载)发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap