TA的每日心情 | 无聊 2018-2-28 12:22 |
---|
签到天数: 4 天 连续签到: 1 天 [LV.2]测试排长
|
场景恢复-不同的激活方式产生的问题
操作步骤:
1、增加一个场景恢复(当对象不存在时,关闭一个进程)
Resources->Recovery Scenario Manager
Object state->Select Object(选择对象:一“按钮对象”)->Recovery Operations(操作为:关闭一个进程)->Post-Recovery Test Run Options(尝试了Repeat current step and continue、Stop the test run这两种)
2、在QTP对象库(Object Repository)中,把在Recovery Scenario Manager设置的那个“按钮对象”删除;
3、加载该“场景恢复”,Test Settings设置如下:
Test Settings->Recovery->Activate recovery scenarios:On every step
这时,运行脚本,在使用到“按钮对象”的那行代码处会激活场景恢复操作,即把我设置的那个进程关闭;
但是,Test Settings中设置如下时:
Test Settings->Recovery->Activate recovery scenarios:On Error
运行脚本,在使用到“按钮对象”的那行代码,会提示找不到该对象,但并不执行场景恢复操作;
根据陈能技下面这篇blog所说,应该是不管我设置为On every step还是On Error,都不会激活场景恢复操作才是正确的啊!!
疑惑中。。。
了解的朋友请告知,谢谢了!
http://www.51testing.com/index.php?uid-130600-action-viewspace-itemid-210202
Situation #2 - Object Not in Object Repository (OR) 对象不在OR中这种错误也不会触发RS的执行!
If you try to access a object from the OR and it does not exist in the OR at all, then QTP will throw an error and RS won’t be fired. Object not found in object repository error is treated as a Script. error by QTP and is raised directly. |
|