Jmeter: Response data is not loaded completly - performance

I'm trying to test a web page.for few request response data is not getting loaded completely, I can see only first few parts of a page. Where as for few request its working fine.Can anyone help me in this?

If you are viewing in view result tree then you should set
view.results.tree.max_size
in jmeter.properties
by default it is 200KB
# Maximum size of HTML page that can be displayed; default=200 * 1024
# Set to 0 to disable the size check and display the whole response
view.results.tree.max_size=204800 # set a value higher than default 204800
or set it 0 for no check

Related

Why do I see a big difference in loadtime between jMeter and user experience when browsing?

My problem is that I see the load time for a web page element on a test in jMeter # 200 miliseconds and when browsing, most of the time I get 3 or 4 seconds, in the condition where the size in bytes is # 331000.
I must mention that I cleared the cache and cookies for each iteration and I inserted also the constant timer between the steps.
The searching an id is the actual case described previously.
var pkg = JavaImporter(org.openqa.selenium);
var wait_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait);
var wait = new wait_ui.WebDriverWait(WDS.browser, 5000);
WDS.sampleResult.sampleStart()
var searchBox = WDS.browser.findElement(pkg.By.id("140:0;p"));
searchBox.click();
searchBox.sendKeys("1053606032");
searchBox.sendKeys(org.openqa.selenium.Keys.ENTER);
WDS.sampleResult.sampleEnd()
I expected to see the same load time results, but maybe an option would be if I wait until some elements on the search results page are visible. But I cannot bring an argument why is this difference. I had another case where the page loads in 10 seconds in Chrome and in jMeter Test Results 300 miliseconds.
Please try with wait until for a specific element which loads as close as the page load.
Below is another try for the same. Use the below code and check if this helps:-
WDS.sampleResult.sampleStart()
WDS.browser.get('http://jmeter-plugins.org')
//(JavascriptExecutor)WDS.browser.executeScript("return document.readyState").toString().equals("complete")
WDS.browser.executeScript("return document.readyState").toString().equals("complete")
WDS.sampleResult.sampleEnd()
For me without execute script page loads in 3 sec and with executeScript it loads in 7 sec..while in browser that loads in around 7.57sec..
Hope this helps.

Laravel: accessing url multiple time with different parameter returns wrong data

The view of my application post data to controller with a parameter in URL. The URL is like
xxxx/admin/shipments/edit/50
It means I am editing the shipment having shipment_id = 50. but when user uses the application after certain time instead of respective shipment_id that is 50. It returns the data of other shipments such as 56, 51, 90 etc.
public function routeShipmentsEdit($shipment_id){
// Numeric Check
If(is_numeric($shipment_id)){}
The reason was server caching. The page size was more than 4k therefore the server was caching it and was always returning the cached page. I managed to reduce the size of page and now its working fine.

JMeter Beanshell sampler caches image

I'm using a JMeter (2.13 r1665067) to test a site with Google Kaptcha on log in and registration until they can be disabled in a test environment. I've recorded a session and set up a Save Responses to a file sampler to extract the kaptcha image. I then have a Beanshell sampler display it so I can enter the code as needed (thanks to this post).
The problem I'm running into now is the first image retrieved from the server is displayed repeatedly. I've tried setting any objects created in the Beanshell to null post-use, and checking the "Reset bsh.Interpreter before each call".
I was able to get around to issue by using the $__(Random) function to append a unique id to each image when created in the Save Responses to a file sampler, but results in a lot of files being created. I can verify the saved image file is changing on the filesystem. I can also restart JMeter, or clear the file from the filesystem for it to appear properly, but only the first time. Adding a timestamp via the Save Responses to a file sampler isn't unique enough, but creates additional files anyway.
I'd like to find out why JMeter seems to be caching the images and if there's a way to have a single file written and read each time, avoiding the slew of them I'd get by appending a unique ID. I imagine it has to do with my config.
Beanshell sampler code:
filenameOrURL = new URL("file://${FILE2}");
image = Toolkit.getDefaultToolkit().getImage(filenameOrURL);
icon = new javax.swing.ImageIcon(image);
pane = new JOptionPane("Enter Captcha", 0, 0, null);
String captcha = (String)pane.showInputDialog(null, "Captcha", "Captcha", 0, icon, null,null);
filenameOrURL = image = pane = icon = null;
log.info(captcha);
vars.putObject("captcha",captcha);
Save Responses to a file sampler parameters:
Filename prefix: /response/response_
Variable name: FILE
Thread Group:
I'd post an image if my reputation preceded me. :blush:
Recording Controller
login.html (GET)
Save Responses to a file
BeanShell Sampler
login.html (POST)
logout.html (GET)
Your issue is not really with JMeter, but with the Toolkit.getImage() function. From its documentation:
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image.
Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer in use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available. If the image data contained in the specified file changes, the Image object returned from this method may still contain stale information which was loaded from the file after a prior call. Previously loaded image data can be manually discarded by calling the flush method on the returned Image.

Is there a maximum size for an ajax call (JSF)?

when I perform a ajax-call which loads a part of the contents of a database, it works fine until the number of loaded entries exceeds about 400. they are mainly only texts, and I'm wondering if there is a limit?
the ajax status bar tells me "success" and no error is thrown; maybe there is a server setting I have set wrong?
PS: javax.faces.STATE_SAVING_METHOD is set to "client"; should I set it to "server"?
thanks for any help!

How do I overcome the XHR FF POST size limit?

My XHR POST REQUEST is cut off. When I try to reload my page information is missing. Firebugs sends following message:
Firebug request size limit has been reached by Firebug.
My question is: What are my options?
Would it work if I declare the content.length in the header?
I added a line to my apache config file and restarted it: LimitRequestBody 0
I increased the size of transfer files in mysql config file
Or it is a browser issue?
The only solution I could think of was to cut the data in pieces and transmit the array one by one but I don't like this idea. The content length is 91691 according to firebug.
Any suggestions?
You just need to modify Firebug settings. In browser's address bar go to about:config, then look for option extensions.firebug.netDisplayedPostBodyLimit.
You should increase its value in order to see non truncated requests. Set it to 65535 for example.
Here you can find many other Firebug options you may want to change: http://getfirebug.com/wiki/index.php/Firebug_Preferences

Resources