Top Banner
http://cheyat.com/qa/ loadrunner-online-training- tutorials Creating Vusers: CHECKPOINTS LRWEB6.5/03
37

Loadrunner online training

Apr 15, 2017

Download

Education

Jilani Shaik
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Loadrunner online training

http://cheyat.com/qa/loadrunner-online-training-tutorials

Creating Vusers: CHECKPOINTS

LRWEB6.5/03

Page 2: Loadrunner online training

Objectives

In this lesson you will learn:

• Visual cues to check for during load testing

• The importance of functional testing under load

• The types of checks in VuGen

• How to add verification checkpoints during recording

Page 3: Loadrunner online training

The Business Process Works for One User . . .

Web Server

Process complete!

Database server

Database server

theInternet

Page 4: Loadrunner online training

. . . But May Not Work for Many Concurrent Users

Web Server

Database server

Database server

theInternet

Process failed!

Page 5: Loadrunner online training

Key Terms Used in This Course

Confirming that all business processescomplete properly while the server(s) handle concurrent usage.

Functional Testing Under Load

Page 6: Loadrunner online training

Which Visual Cues Confirm Business Process Success?

Where in the business process might load overwhelm the server(s) and cause failure?

What visual cues in the browser indicate success?

Web-based bookseller

Photo archive of newspaper extranet

• Search• Submit order

Results page instead of error message

Image request

Expected image displayed

Order Entry Intranet Site

Inserting a sales order

Order number appears

EXAMPLE CASE SCENARIOS

Page 7: Loadrunner online training

How Virtual Users Verify FunctionalityVirtual Users:

• Compare the actual value on the web page to the expected value during playback

• Report the comparison result (status), either PASS or FAIL

• Store the expected value

Page 8: Loadrunner online training

Key Terms Used in This Course

A step in the Vuser script which verifies whether a visual cue appeared as expected.

Checkpoint

Page 9: Loadrunner online training

Types of Checks

Did the news site display the picture?

Example usageCheck

Image

Page 10: Loadrunner online training

Determine Visual Cues to Verify

Same image whenever page is

loaded . . .

Use image check

Page 11: Loadrunner online training

LoadRunner Expert Workflow“Zooming In”

TuneSystem Based

on Analysis

Analyze System Under Load

Run Scenarios

Create Scenarios

Create Web Virtual Users

Phase 1

Plan Load Test

Phase 2 Phase 3 Phase 4 Phase 5

CREATE WEB VIRTUAL USERS

2.1 Record user actions

2.2 Add LoadRunner transactions

2.3 Parameterize data

2.4 Add verification checks

2.5 Verify correct execution

Page 12: Loadrunner online training

2.4 Add Verification ChecksCreating an Image Check

a. In the browser, right click on image to be checked

b. Select “Save Picture As…” from pop-up menu

1. While recording, get the image name

Page 13: Loadrunner online training

2.4 Add Verification ChecksCreating an Image Check

(logo.gif)

c. Copy existing file name using Ctrl + C

d. Click Cancel

NOTE: If the file extension (.gif, .jpg, etc.) does not appear, type it in the box yourself before copying

Page 14: Loadrunner online training

a. Click the Insert After toolbar button

2.4 Add Verification ChecksCreating an Image Check

c. Select Image Check, and click OK.

b. The Add Step dialog opens

2. Add the step

The Image Check Properties dialog opens.

Page 15: Loadrunner online training

a. Check the Image server file name (SRC attribute) check box

2.4 Add Verification ChecksCreating an Image Check

b. Paste the file name into the edit box using Ctrl + V

3. Paste the file name into Image Check Properties

Page 16: Loadrunner online training

2.4 Add Verification ChecksCreating an Image Check

a. Click the General tabb. Change the Step

Name from default “Image Check” to a more descriptive name

c. Click OK to finish

4. Rename the step

Page 17: Loadrunner online training

2.4 Add Verification ChecksCreating an Image Check

The image check step is displayed in the Icon Tree under the page where image appears

Page 18: Loadrunner online training

Did a search enginereturn expected matches?

Types of Checks

Example usageCheck

Did the news site display the picture?

Image

Text

Page 19: Loadrunner online training

Determine Text Check Type to Use

DESCRIPTION

Checks for numeric values defined in the check

Number 9Checks for a flexible range of values

Regular expression [a-z].*

Checks for an exact match of the visual cue

Plain text

TYPE EXAMPLE

Page 20: Loadrunner online training

Determine Text Check Type to Use

Same static text whenever page is

loaded . . .

Use plain text

Type Type

Page 21: Loadrunner online training

2.4 Add Verification ChecksPlain Text Check With Boundaries

Page 22: Loadrunner online training

Determine Text Check Type to Use

Order number changes for every

transaction . . .

Use regular expression

[0-9].*

Page 23: Loadrunner online training

Key Terms Used in This Course

A regular expression uses a wild card to indicate a range of possible values.

Regular Expression

Page 24: Loadrunner online training

Regular Expressions Explained

st* startstop

matches any string of characters

[0-9]* 12599431

matches any string of characters in range

[ ]

[5-9]th 5th7th

matches a range of characters

[ ]

option [a-f] option coption d

welcome welcomeswelcomed

matches any character

NOTE: For more information about regular expressions consult your LoadRunner documentation

Page 25: Loadrunner online training

2.4 Add Verification ChecksRegular Expression Check

Page 26: Loadrunner online training

2.4 Add Verification ChecksChecking a Visual Cue Generated by a Parameter

Visual Cue may be:• robot• alien• toucan• rabbit

depending on the input data

How tocheck ?

Page 27: Loadrunner online training

2.4 Add Verification ChecksChecking a Visual Cue Generated by a Parameter1. Add a text check to a

parameterized step2. Click the ABC button3. Select the step’s

parameter from the list and click OK• LoadRunner will

now check for the value of the parameter during each iteration

Page 28: Loadrunner online training

Checking for an Error Page

Q: If you check for an error page and the error page is found, should the Vuser pass?

A: No.

Q: So, how do you change a check’s pass to a fail and vice versa?

Page 29: Loadrunner online training

Modify Check Properties1. Open Text Check Properties

dialog, General tab

2. Uncheck View only the active properties

3. In the Expect row, select “NotFound” from Value list

4. Click the box to the left of Expect

EXAMPLE

Page 30: Loadrunner online training

LoadRunner Expert Workflow“Zooming In”

TuneSystem Based

on Analysis

Analyze System Under Load

Run Scenarios

Create Scenarios

Create Web Virtual Users

Phase 1

Plan Load Test

Phase 2 Phase 3 Phase 4 Phase 5

CREATE WEB VIRTUAL USERS

2.1 Record user actions

2.2 Add LoadRunner transactions

2.3 Parameterize data

2.4 Add verification checks

2.5 Verify correct execution

Page 31: Loadrunner online training

Setup for Execution –Enable Checks in Run-Time Settings

NOTE: If a check was added• during recording, this setting

is automatically checked• after recording, you must

check the setting yourself

Page 32: Loadrunner online training

2.5 Verify Correct ExecutionCheck Mercury Test Results Window

PASSED EXAMPLETest Status = PassedCheck marks = Green

Page 33: Loadrunner online training

2.5 Verify Correct ExecutionCheck Mercury Test Results Window

FAILED EXAMPLETest Status = FailedX marks = Red

Page 34: Loadrunner online training

2.5 Verify Correct Execution Check VuGen Execution Log

PASSED EXAMPLE

Page 35: Loadrunner online training

2.5 Verify Correct Execution Check VuGen Execution Log

FAILED EXAMPLE

Page 36: Loadrunner online training

Summary

• Determine the visual cues you will check to verify each business process

• Add text and image checks during recording• Make sure that Enable verification checks is

checked in the Run-Time Settings, HTTP tab before running the Vuser

• LoadRunner compares a stored, expected value to an actual value obtained during the run

• The check status is always PASS or FAIL