QTP测试脚本的维护 - 使用Update运行模式和Maintenance运行模式

Why Tests Fail 为什么脚本运行会失败?

Tests fail when QuickTest encounters a step it cannot perform or the results of a step indicate failure. In many cases this is due to the application being tested not functioning properly. QuickTest then provides you with test results that assist you in understanding how to fix your application.

Sometimes a test fails because the application being tested has changed from when the test was created and the QuickTest test needs to be updated to reflect those changes. Your object repository may also be missing some of the objects it needs to run the test. QuickTest provides tools that help identify and resolve some of these issues.

·   Object Changes

·   Checkpoint Changes

通常是对象发生改变或者是检查点发生了改变。这就带来了测试脚本维护的问题。在QTP中,可以使用Maintenance运行模式和Update运行模式来进行脚本的自动化更新和维护。

 

Running Tests with the Maintenance Run Wizard

The Maintenance Run Wizard helps you to maintain your test when it encounters the following problems and provides the following solutions:

 

Problem

Solution

The step failed because the object in your test cannot be identified in the application.

The Maintenance Run Wizard helps you identify the object in the application that you want your test to use.

If you point to an object in the application being tested, the Maintenance Run wizard will compare that object to the objects in the associated object repositories.

Depending on how the property values of the object to which you point compare to the property values of the objects in the associated repositories, the Maintenance Run wizard will suggest one of a several options for updating your test to reflect the changes in the application.

You can also choose to add a comment to your test before the failed step.

The step failed because the object in your test is missing from your associated object repositories.

The Maintenance Run Wizard helps you add the missing object to the repository.

You can also choose to add a comment to your test before the failed step.

The object in your step exists in the application, but can be identified only through Smart Identification.

Identifying objects using Smart Identification may cause tests to run slower. (For more information see, Configuring Smart Identification.) The Maintenance Run Wizard helps you modify the description of the object, so that Smart Identification is not needed.

 

Maintenance运行模式主要解决对象识别导致的脚本失败的问题。

关于Maintenance运行模式可以观看QTP10附带的视频(Help->Product Feature Movies->Maintenance Run Mode)。

 

 

Updating a Test Using the Update Run Mode Option

When you run a test in Update Run Mode, QuickTest runs the test to update the test object descriptions, the Active Screen images and values, and/or the expected checkpoint values. After you save the test, the updated data is used for subsequent runs.

You can specify one or more of the following information types to update:

Update test object descriptions. QuickTest updates the set of properties for each object class in your associated object repositories according to the properties currently defined in the Object Identification dialog box. You can use this option to modify the set of properties used to identify an object of a certain type.

Update checkpoint properties and output property values. QuickTest updates the expected values of your checkpoints to reflect any changes that may have occurred in your application since you created the test and updates the list of items that can be retrieved in your output value steps.

Update Active Screen images and values. QuickTest updates images and property values in the Active Screen to reflect any changes that may have occurred in your application since you recorded the test or if the Active Screen does not appear as it should. For example, suppose a dialog box in your application has changed since you recorded your test. You can update the test to update the dialog box appearance and its properties in the Active Screen.

 

使用Update运行模式可以在回放脚本过程中更新测试对象描述、检查点属性和输出属性值、更新Active Screen

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值