博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
QTP中为什么恢复场景(Recovery Scenario)没有被触发?
阅读量:4200 次
发布时间:2019-05-26

本文共 1964 字,大约阅读时间需要 6 分钟。

Tarun Lalwani在这篇文章归纳总结了5种QTP的恢复场景不会被触发的情况:

Why is my Recovery Scenario not getting fired?

Debugging Recovery Scenario (RS) is always been a tough ask. But knowing situations where RS won’t work before hand can be of added

advantage. In this article we will explore various possible scenarios where RS is not fired. We will assume the RS to be fired is “Any Error”

 

Situation #1 - Script Errors   脚本中没有涉及到测试对象的情况下,RS是不会被触发的!

Errors NOT involving any Test Object won’t fire any recovery scenario. All the code lines listed below will raise an error but not a RS

X = 2/0

Y = Left("Test", -2)

 

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.

 

Situation #3 - Modal dialog blocking execution   模式的对话框挡住了执行也不会触发RS的执行!

In case the operation you have performed causes a modal Dialog to appear, RS can’t get fired in such situations. The simplest example of this

the code shown below

Msgbox "You can't fire a Recovery scenario now"

The call to the Msgbox blocks execution in current thread and QTP get busy waiting for someone to close the message box. In such situations

no RS can get executed

 

Situation #4 - Associated Library is not found   找不到关联的函数库这种错误也不会触发RS的执行!

In case the RS action is to call a Function from a Library file and Library file is not found, the RS will not get triggered.

Situation #5 - Activate Recovery Scenario setting is not configured properly   如果Active Recovery Scenario被设置为“Never”也不会触发RS

Go to File->Settings…->Recovery (Tab)->Activate Recovery Scenario option. If the value is set to ‘Never’ no RS can get fired, in case value is

set to ‘On Error’ then the recovery scenario will only be fired when an error occurs. In case the scenario is not fired change this setting to ‘On

Every Step’

转载地址:http://qwnli.baihongyu.com/

你可能感兴趣的文章
yii2 db 操作
查看>>
mongodb group 有条件的过滤组合个数。
查看>>
yii2 用命令行操作web下的controller
查看>>
yii2 console的使用
查看>>
关于mongodb的 数组分组 array group
查看>>
MongoDB新的数据统计框架介绍
查看>>
mongodb fulltextsearch 关于语言的设置选项
查看>>
mongodb 增加全文检索索引
查看>>
symfony
查看>>
yourls 短连接 安装
查看>>
yii2 php namespace 引入第三方非namespace库文件时候,报错:Class not found 的解决
查看>>
softlayer 端口开放
查看>>
操作1:mongodb安装
查看>>
操作2:mongodb使用语法
查看>>
如何给分类增加一个属性(后台)
查看>>
linux设置环境变量 临时设置 和 永久设置
查看>>
检查网站在世界各地的打开速度
查看>>
jquery 向上(顶部),向下(底部)滑动
查看>>
seo
查看>>
10个出色的NoSQL数据库
查看>>