You are on page 1of 20

Using Standard Checkpoints

EDUCATION SERVICES

QTP9.0USING-SLIDES-01A

Objectives
After completing this chapter, you will be able to:

Define checkpoints.
Use standard checkpoints. Add flexibility to a constant value using a regular expression.

QuickTest Professional Workflow

Understanding Checkpoints
A checkpoint is a specialized step that compares two values and reports the result. QuickTest compares actual results from the test run with expected results in the test plan. If the two values match, the checkpoint passes. Otherwise, the test fails.

Using Checkpoints
You use a checkpoint to:

Verify the state of an object.


Confirm that an application performs as expected.

Visual Cues

Checkpoint Types

Standard Checkpoint

Inserting a Checkpoint During Recording

Insert a Checkpoint After Recording

10

Identifying a Failed Checkpoint

11

Using a Regular Expression

12

Some Regular Expressions


Expression Period Asterisk Plus Char . * + Description Matches any single character Matches zero to any number of occurrences of the preceding character Matches one to any number of occurrences of the preceding character Matches a range of characters Matches a range of numbers Matches any alphanumeric character including underscore

Brackets

[A-Z][a-z] [0-9] \w \W

Matches any non-alphanumeric character


Matches any digit Matches exactly four digits
13

Digit

\d \d{4}

Rename a Checkpoint

14

Add a Comment

15

Summary
In this chapter, you learned how to: Define checkpoints. Use standard checkpoints. Add flexibility to a constant value by using a regular expression.

16

Review Questions
Now answer these review questions. 1. What is a Standard checkpoint? a) A mechanism to check the property of an object b) An add-in c) An object type d) A parameter

17

Review Questions
2. How do you determine if a checkpoint is used in a test? a) A check mark appears next to the step in the test results.

b) The Operation column of Keyword View lists the operation as Check. c) A check mark appears at each level of the Test Summary tree. d) All of the above.

18

Review Questions
3. Does QuickTest verify only the visible properties of the application? 4. Why do you use regular expressions in your tests?

a) To set an object property.


b) To define a checkpoint that can accept a range of values.

c) To check that all add-ins are installed.

19

Exercise: Adding Checkpoints

Part 1: Insert a standard checkpoint


Part 2: Check the test results Part 3: Modify the test

Part 5: Add a comment Part 6: Run the test Part 7: Modify and run the test Part 8: Fix the test

Part 4: Record and open a Fax Order test

20