0% found this document useful (0 votes)
71 views

GUI Checkpoints: in This Lesson You Will Learn

This document discusses how to use GUI checkpoints in automated testing to check the state of GUI objects. It explains that GUI checkpoints allow verifying attributes of objects and windows, such as labels, enabled status, and text. Checkpoints can check a single object or multiple objects by comparing actual results to expected results stored in checklist and expected results files. The document provides examples of how to set up and perform different types of GUI checkpoints.

Uploaded by

Amar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

GUI Checkpoints: in This Lesson You Will Learn

This document discusses how to use GUI checkpoints in automated testing to check the state of GUI objects. It explains that GUI checkpoints allow verifying attributes of objects and windows, such as labels, enabled status, and text. Checkpoints can check a single object or multiple objects by comparing actual results to expected results stored in checklist and expected results files. The document provides examples of how to set up and perform different types of GUI checkpoints.

Uploaded by

Amar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 13

GUI Checkpoints

In this lesson you will learn:


• How to check the state or attributes of GUI objects
• How to view the results of a GUI checkpoint

Manual Automated

Verify Checkpoints
–visually check application –GUI, bitmap, text
–compare expected to actual
WinRunner Workflow
1 Create GUI Map

a. Set up initial conditions


b. Record operations
2 Create Test c. Insert sync points
d. Insert checkpoints
(GUI, bitmap, text)
e. Enhance using TSL
f. Clean up

3 Run + View Results


GUI Checkpoint
• Check the state of an object/window by querying
attributes:
– Does the window have the correct size? (width/height)
– Is the checkbox on/off? (value)
– Is the button enabled? (enabled)
– Is an edit field in focus? (focus)
• You can perform a single object check or a
multiple object check
What Do You Want to Check?
For each type of object or window you can perform different
checks
– objects and windows have many attributes you can query, so there are many
checks you can perform

e
pplle
a
amm
EEx
x
width label

focus enabled
Example: Edit Checks

Default check: Compare Text


Example: check_button Checks

Default check: State


Single Object Check
WinRunner stores:
– the object or window in a checklist file
– the attribute(s) that you want to check in a checklist file
– the expected results of the attributes you are checking in
an expected results file
e
pplle Checking that the OK button has the correct label
x
x aam
m
EE and is enabled

Checklist
Checklist File
File Expected
Expected Results
Results File
File
"Flight Reservation": "Flight Reservation":
{ {
} }
"OK": "OK":
{ {
ENABLED_CHK: "", ENABLED_CHK: "ON",
LABEL_CHK: "" LABEL_CHK: "OK"
} }
Multiple Object Check
WinRunner stores:
– all objects or windows in a checklist file
– all the attribute(s) that you want to check in a checklist file
– the expected results of all the attributes you are checking in
an expected results file

Checking: Checklist
Checklist File
File Expected
Expected Results
Results File
File
• Choose City window has "Choose City": "Choose City":
correct width and height { {
• City list has correct list WIDTH_CHK:, WIDTH_CHK: 470,
content HEIGHT_CHK: HEIGHT_CHK: 367
• OK button has correct label } }
"City:": "City:":
Choose City { {
SELECTION_CHK: "" SELECTION_CHK: "Denver"
City: } }
"OK": "OK":
{ {
LABEL_CHK: "" LABEL_CHK: "OK"
} }
Check GUI Statements
Single object check:
obj_check_gui (object_name, checklist_file, exp_res_file, time);
Single window check:
win_check_gui(window_name, checklist_file, exp_res_file, time);
Multiple object check:
win_check_gui(window_name, checklist_file, exp_res_file, time);

ppllee
a
a m
m
EExx obj_check_gui
obj_check_gui("OK",
("OK","list1.ckl",
"list1.ckl","gui1",1);
"gui1",1);
win_check_gui
win_check_gui("Login",
("Login","list1.ckl",
"list1.ckl","gui1",5);
"gui1",5);
The Test Directory
After a GUI Check

exp
• Expected GUI results stored in
exp subdirectory <test name>

gui1.chk
gui2.chk

• Checklist stored in the chklist


subdirectory checklist

list1.ckl
list2.ckl
GUI Check Results

View only failures

Update the expected


result of a check

View results
in more detail
Summary
• Use GUI checkpoints to check GUI objects

• Based on documented test case and/or requirement


specifications:
– determine the objects or windows to verify
– determine what attributes to check

• Use Check GUI -> Object/Window to check a single object

• Use Check GUI -> Checklist to check multiple objects


Exercise 4
GUI Checkpoints

You might also like