📜  QTP-CheckPoints

📅  最后修改于: 2020-12-06 10:40:47             🧑  作者: Mango


顾名思义,检查点是指一个验证点,该验证点将指定属性的当前值或对象的当前状态与期望值进行比较,该期望值可以在脚本中的任何时间点插入。

检查点的类型

Sr.No. Type & Description
1

Standard Checkpoint

Verifies the property values of an object in application under test and supported by all add-in environments.

2

Bitmap Checkpoint

Verifies an area of your application as a bitmap

3

File Content Checkpoint

Verifies the text in a dynamically generated or accessed file such as .txt,.pdf

4

Table Checkpoint

Verifies the information within a table. Not all environments are supported.

5

Text Checkpoint

Verify if the text that is displayed within a defined area in a Windows-based application, according to specified criteria.

6

Text Area Checkpoint

Verifies if the text string is displayed within a defined area in a Windows-based application, according to specified criteria.

7

Accessibility Checkpoint

Verifies the page and reports the areas of the Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines

8

Page Checkpoint

Verifies the characteristics of a Web page. It can also check for broken links.

9

Database Checkpoint

Verifies the contents of a database accessed by the application under test.

10

XML Checkpoint

Verifies the content of the .xml documents or .xml documents in Web pages and frames.

插入检查点

当用户想要插入一个检查点时,必须确保仅在录制会话期间支持大多数检查点。用户停止记录后,将不会启用检查点。

当用户未处于录制模式时,下面给出的是检查点菜单。

录制未进行时的检查点菜单

当用户处于录制模式时,下面给出的是检查点菜单。

正在进行录制时的Check Point菜单

为测试中的应用程序添加了检查点-“ http://easycalculation.com/”

' 1. Inserted Standard Checkpoint
Status = Browser("Math Calculator").Page("Math 
   Calculator").Link("Numbers").Check CheckPoint("Numbers")

If Status Then
   print "Checkpoint Passed"
Else
   Print "Checkpoint Failed"
End if

' 2. Inserted BitMap Checkpoint
imgchkpoint = Browser("Math Calculator").Page("Math 
   Calculator").Image("French").Check CheckPoint("French")

If imgchkpoint Then
   print "Checkpoint Passed"
Else
   Print "Checkpoint Failed"
End if

查看检查点属性

插入后,如果测试人员想要更改值,我们可以通过右键单击脚本的关键字“ checkpoint”并导航到“ Checkpoint Properties”来完成,如下所示:

检查点属性。

您也可以在对象存储库中找到相同的检查点,如下所示。它准确显示了使用哪种类型的检查点,预期值和超时值是什么。

检查点属性。