Today, I will describe how to use LoadRunner for broken links detection.
'Broken' link is 'not valid' link. This link usually returns 404 Error - "Page not found".
LoadRunner allows broken links detection during:
As you can see, the initial task - broken links detection with LoadRunner - can be resolved in two ways.
You have to set appropriate option only. LoadRunner
Related articles:
--
Dmitry Motevich,
waiting for your feedback, comments, and questions...
'Broken' link is 'not valid' link. This link usually returns 404 Error - "Page not found".
Another side of broken links is that images other resources are not displayed.
Using LoadRunner for broken links detection can be helpful, when you perform load testing of a site and you have to be sure, that all pages, images, applets, and other resources are available during the high server loading.
LoadRunner allows broken links detection during:
- Script recording
- Script execution
- Broken links detection during LoadRunner script recording
You have to set appropriate recording options. For that, click 'Options...' button from 'Star Recording' dialog:
'Recording Options' dialog opens. Here, set 'Add comment to script for HTTP errors while recording' option:
Please, note that you can see a description of the 'Add comment to script for HTTP errors while recording' option.
Now, you are ready to record your script. Click 'OK' button on 'Recording Options' dialog and start recording.
If LoadRunner find any HTTP errors, it will include comment into VuGen script.
My application had some problems - there were several broken links for images there. So, LoadRunner generated the following script (click the image to view enlarged):
As you see, my application had several broken links to images and LoadRunner detected it successfully. Also, you can find the point, where these broken links were used. This is previous function - web_url.
LoadRunner inserted comments, which describe all occurred HTTP errors. Comments contain URL and server response.
Since you have server responses, you can determine reasons of HTTP errors.
Tips: For detailed info on HTTP status codes read this article from wikipedia and this one from w3.org.
Tips: Read about the most 'popular' HTTP status code - 404. - Broken links detection during LoadRunner script execution
LoadRunner can check broken links during the script execution too.
You have to turn off one LoadRunner run-time option - 'Non-critical resource errors as warnings':
Uncheck the 'Non-critical resource errors as warnings' option and execute previous script again.
The result is:
Please, note that LoadRunner's Replay Log contains errors about images we mentioned before. Their links were broken, that's why LoadRunner generated errors.
As you can see, the initial task - broken links detection with LoadRunner - can be resolved in two ways.
You have to set appropriate option only. LoadRunner
Related articles:
- Using Correlation in LoadRunner scripts - visual tutorial
- Boundaries for web_reg_save_param LoadRunner function
- LoadRunner Correlation - How to capture an array of dynamic data with web_reg_save_param function
- All LoadRunner visual tutorials
--
Dmitry Motevich,
waiting for your feedback, comments, and questions...
14 comments:
Dmitry-
Good tip! Web server logs can also be checked for 404s and other error codes (500s, etc.). It is often good to check the logs both after recording and when editing scripts and adding parameters to make sure the scripts are sending properly formed requests.
Great site, keep up the good work!
Good note, Charlie!
I mean your note about using of web server logs.
Thank you for your comment :)
Awesome Charlie
Awesome Charlie
Hi,
The Articles pretty good and helpful.
I have two questions, probably you may be aware of.
1) How do handle Soap Compression extensions in Load Runner.? I am using web services protocol.
2) Scripts recorded in Windows machine, can we use the same scripts when we use unix machine as load generator?
Thanks
Ram
thanks mat good one
Hi dmitry motevich,
your blog have very very informative articles about PT. Good work Keep it up. It's very useful for beginners like me how we could know about performance of a web application.
I have one doubt. In Performance testing what are all the deliverables?):):
Hi Dmitry,
Your blog is simply great!!
I am getting so many things form this.. Thanks a lot for your help..
Keep it up..
Prashanth
2Prashant:
Thank you :)
I will continue posting articles here :)
Hi Dmitry,
I have a doubt on error 404.
I got an error - "Error26627: HTTP Status-Code=404 (NOT FOUND) for..." even after unchecking the run-time settings option 'non-critical resource errors as warnings'. I get this error when I run the HTML based script. But, the same scenario runs fine when I record it in URL script mode.
Can you help me out in solving this problem?
2Brindha:
I think, that you found broken link on your site. If I were on your place, I would submit a bug and contact developers on this issue.
hi
motevich
i have a problem that is i need to record the some navigation(d/:folder-my folder-mydata-records-) through remotedesktop connection,when i tried qtp recorded the script on only local system,i didnt find any script in expert view when it was recoding in remote system
can you sugeest any solution for this
@Anonymous,
I cannot understand how your questions relates to the current article "Broken links detection - LoadRunner tutorial"?
Dear Readers!
Thank you very much for you comments!
Since this article was published more than one year ago, I've just disabled an adding of new comments for the article.
Post a Comment