In this article, we are going to understand about List Non-Critical Resource Errors as Warnings in LoadRunner. When you replay the script, sometimes you might have noticed following warning “Warning -26627: HTTP Status-Code=404 (Not Found) for “http://example.com/images/spacer.gif”. We are going to deep-dive into those warnings, understand its importance and how to rectify that in VuGen script.
Types of Resources in LoadRunner
There are two types of resources: Critical and Non-Critical. Non-critical resources such as image, css, js, png, jpeg, icon, java applet etc. The resources which are not impacting your actual business transactions you can call them as non-critical resources.
Critical resources plays an critical role in the actual business transactions. By default, following are the non-resources that are enabled: text/html and text/xml.
If you want *.icon files to be part of non-resources (critical), then you need to add it to the list of non-resources in Recording Options as shown in the below.
List Non-Critical Resource Errors as Warnings
In this web tours example, I simply logged in and booked the tickets. But when I executed the script, I got the following warnings in the Output log.
vuser_end.c(4): Warning -26627: HTTP Status-Code=404 (Not Found) for “http://newtours.demoaut.com/black” [MsgId: MWAR-26627]
vuser_end.c(4): Warning -26627: HTTP Status-Code=404 (Not Found) for “http://newtours.demoaut.com/images/spacer.gif” [MsgId: MWAR-26627]
By default, List Non-Critical Resource Errors as Warnings option is enabled. When the script executes, if the resources (non-critical) throws an error, it will not stop the execution, but rather it will display the errors as warnings.
If you disable List Non-Critical Resource Errors as Warnings option and execute, you will get the following errors.
vuser_init.c(12): Error -26627: HTTP Status-Code=404 (Not Found) for “http://newtours.demoaut.com/black” [MsgId: MERR-26627]
vuser_init.c(12): Error -26627: HTTP Status-Code=404 (Not Found) for “http://newtours.demoaut.com/images/spacer.gif” [MsgId: MERR-26627]
What will happen during recording?
During recording, LoadRunner marks each resource attribute as 0 or 1, when you replay, based on the attribute set, the resource will be downloaded or not-downloaded. If the attribute is 0, the resource will be downloaded; if the attribute is 1, the resource will not be downloaded. In below code, the resource attribute marked as 0, which will be downloaded during replay.
Resource – A value indicating whether the URL is a resource:0 – the URL is not a resource. 1 – the URL is a resource. In below example, you can set the Resoource as either 0 or 1. Both will work without any issues.
But the below code only works for the Resource attribute set to 0.
If you set the Resource attribute to 1, then the resource will not be downloaded. You can check in the runtime viewer. Below is the output of runtime viewer.
List Non-Critical Resource Errors as Warnings in LoadRunner: Enabled or Disabled
From my opinion, all resources are CRITICAL. Assume that you are testing eCommerce related web applications, users buy products after viewing the product images. In this case, all the images are critical. On the other hand, if you are testing banking related web applications, where you do not care about the images present in the website, all you care is about the business functionalities and its response.
By enabling, List Non-Critical Resource Errors as Warnings in your load test might not reveal the performance bottlenecks of those RESOURCES.
In my experience, I recommend you to disable the default settings of List Non-Critical Resource Errors as Warnings checkbox for better performance testing.
Your turn: What is your load test setting List Non-Critical Resource Errors as Warnings in LoadRunner? Checked or Unchecked.
Please do check out my previous article on web global verification in LoadRunner.
- Speedometer 2.0 Testing - January 17, 2018
- Performance Analysis of Rajini Makkal Mandram Website - January 8, 2018
- Must Have Tools For Technical Founders - November 9, 2017
- Brotli Compression in Performance Testing - October 6, 2017
- Unboxing HPE StormRunner 2.7 - September 27, 2017