学习《QTP自动化测试进阶》第10章 – QTP测试脚本开发
Utility对象:
用PathFinder对象查找文件
用XMLUtil对象检查XML
用Extern对象加载DLL
用SystemUtil的Run方法启动被测试程序
用Reporter写测试结果
用Environment读写环境变量
QTP内置函数的使用:
用Print函数显示信息
用Wait函数暂停测试脚本的执行
用ExecuteFile执行VBScript脚本
用DotNetFactory对象访问.NET类库
恢复场景(Recovery Scenario):让QTP在碰到非预期的事件或错误时,可以恢复脚本的执行控制权
补充学习参考资料:
1、LearnQTP.com上的《QTP and DotNetfactory》系列文章:
http://www.learnqtp.com/category/dotnetfactory/
2、《QTP中为什么恢复场景(Recovery Scenario)没有被触发》:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/01/25/5255831.aspx
3、《QTP的TextUtil对象的使用》:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/01/21/5221808.aspx
4、《揭秘QTP保留对象机制》:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/01/08/5162020.aspx
5、在 QTP10 中, Reporter 对象有了一些改进,《QTP10的Reporter对象》这篇文章作了相关介绍:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/01/02/5121064.aspx
6、《重写QTP的Reporter对象》:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/01/01/5117119.aspx
7、《QTP的报告管理扩展框架 - ReporterManager》:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2008/01/27/2068905.aspx
8、ReporterManager下载地址:
http://www.advancedqtp.com/knowledge-base/projects/reportermanager/reportermanager-version-921/
9、Dani Vainstein写的StringUtil,可以让我们拥有类似.NET Framework中的字符串处理类库般的能力,下载地址:
http://www.advancedqtp.com/knowledge-base/projects/stringutil/the-stringutil-project/
10、《RFT的异常处理方式》:
http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/01/23/5248635.aspx
11、《Recovery Scenario Test Run Error: Item in list or menu not found》
http://relevantcodes.com/recovery-scenario-test-run-error-item-in-list-or-menu-not-found/
转载于:https://blog.51cto.com/5587423/959920