51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2982|回复: 3
打印 上一主题 下一主题

[原创] 环境Qtp10+Delphi,安装好插件后对被测程序进行配置才能正常使用。具体怎么去配置

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2011-7-19 10:24:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
问题:在网上很多资料中提到:QTP的delphi插件安装后,还需要对被测程序进行配置才能正常使用。
方法如下,但我很不理解这具体怎么去设置请大家指点迷津!!!!!???
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.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2011-12-15 10:38:59 | 只看该作者
同问
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2011-12-15 15:31:28 | 只看该作者
1. 将QTP delphi插件中的文件copy到源文件对应目录下,可以放在[project].dpr文件所在目录下
2. 在delphi中打开被测应用程序的源文件,比如你测的是Testing.exe,那么在delphi中就去找打并打开Testing.dpr这个delphi程序源文件,然后就是按照文档中的提示在uses 中加入一行MicDelphiAgent, 之后保存关闭
3. 编译该dpr文件,得到exe文件,然后用其替换被测应用程序中的exe

注意:自定义的delphi控件识别也可以通过pas+xml的编写来自定义控件的识别
另外,QTP默认只能支持Delphi 6及以上版本,如果是5或以前的,那么需要改写QTP插件提供的pas文件里的代码
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2012-8-28 10:10:56 | 只看该作者
回复 3# hsjzfling

如果是delphi5的话,怎么修改那个pas文件啊
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-29 05:27 , Processed in 0.096113 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表