Performance Testing (Check point)

Check point
When running a test, you always need to verify if certain content is on the returned page. A checkpoint verifies that expected information appears on a web page while the script is running.

There are two types of check points
                -Text check point
                -Image check point

Text check point
There are 3 ways to insert text check point
1)      Enabling text check during recording
Generates web_reg_find() functions for HTML page titles. VUGen adds the strings from the page title tag and uses it as an argument for web_reg_find()
2)      Text check during recording
When recording the script, text check on a particular page can be performed by selecting the text to be checked and clicking on from the floating tool bar.
3)      Text check after recroding
After recording, text check can be included in the script. The text check function can be added just before the transaction where the text occurs corresponding to the page

Syntax:  web_reg_find (const char *attribute_list, LAST);
Example: web_reg_find(“Text=Welcome”,LAST);

Where Welcome is the text to be found on the web page.


Let’s see below how to check that a greeting 'Welcome to the Web Tours site' is shown on a start page: Lets put text check point using a tree view method




I've recorded a simple script on Web Tour application - it just opens a start page, logs in, and logs out:




After that:
open the script in Tree View (with menu 'View/Tree View')
select initial step ('Url: WebTours')
select the text that you would like to check on the page and right click




Click on “Add a text check point”

Then open your LoadRunner script in Script View (menu 'View/Script View') and you will see that web_reg_find function has been just added before the first function:

web_reg_find("Text=Welcome to the Web Tours site", "Search=Body", LAST);
web_url("WebTours", "URL=...", ...
Note: web_reg_find function has been added before the page opening function (web_url)!





Image check point
Image check point function is used to verify whether a particular image is getting downloaded properly or not in a webpage. The function to use for image check is web_image_check();



Comments

Popular posts from this blog

Loadrunner Functions

Neo Load Performance testing Tool

Analyzer in LoadRunner Part1