JMeter response time is high - jmeter

I have a test plan written using JMeter & in that I have used Regular expression extractor to extract some value and pass it ON to other request in the test plan. I also used the CSV file to pick the value from sheet & used in my test plan.
Now the problem is that while running the script using JMeter, I am getting the high response time. When the JMeter is running the script, I tried to check the same site response manually & in that I was getting a very less response time.
I disabled the listeners & started the script in Non GUI mode but still the response time is on high side.
I need to justify the response time received from the JMeter to the client. Could someone please let me know what am I doing wrong ?
Thanks

I used the HTTP Cache Manager with Use Cache-Control/Expires header option which reduces the JMeter response time & nearly in sync with browser timing.

Related

Testing response time

I am trying to make a request where it returns very big data. When I make a request from Katalon Studio or JMeter, it gives me a response after 7-8 seconds. But from swagger when I try to make same request as I did from katalon studio it needs 2-3 minutes to give me the data and also if it needs more than 2-3 minutes, page dies.
Can you help me understanding, why I get response from swagger so slow and from Katalon so fast? I think the problem is in showing the big information ?
In JMeter data is not shown fully.
I can provide everything what is needed.
This is the data from JMeter.
With regards to "swagger so slow" - most probably it's your browser issue, it might fail to render big amounts of data. Consider using a command-line tool like Curl which can output the response as plain text or save it into a file
With regards to JMeter data is not shown fully, by default JMeter limits the data coming from the server to save memory to 10 megabytes, it's controllable via the view.results.tree.max_size property. If you want to see the full response data in the View Results Tree listener - add the next line to user.properties file:
view.results.tree.max_size=0
or provide the above parameter via -J command-line argument like:
jmeter -Jview.results.tree.max_size=0 -t test.jmx ....
see Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of setting/overriding them.
You can also consider using Save Responses to a file listener to store the response to a file of your choice.

Blazemeter Script Runninf on Jmeter doesnt save data in DB

I am creating a script through Blazemeter (which storing some data in DB) and running through JMeter. Script is running fine but data is not stored in DB. What I am missing?
The chance of replaying recorded script is minimal as modern web applications widely use dynamic parameters for security reasons or client-side state tracking
Make sure to add HTTP Cookie Manager to your Test Plan
Make sure to perform correlation of any dynamic parameters
With regards to "Script is running fine" - JMeter automatically treats responses with HTTP Status Codes below 400 as successful, so "green" result doesn't necessarily mean that your script is doing what it is supposed to be doing. Try inspecting responses using View Results Tree listener, most probably you're getting stuck at login page. Going forward you can consider adding Response Assertions in order to perform extra checks against the responses.

website benchmaking tool with automatic mail support

I'm looking out for a tool that supports recording option in web on the tasks that I perform (search and result analysis).
I finally rerun the recorded script and calculate the time that is taken for each page that is loaded (generally based on the search criteria) within the web.
Once the page loading exceeds the defined time, the exceeded time should be highlighted.
The reports on this should be automatically saved.
The above scenario was tried using jmeter, but I was not able to set benchmark and automatically set the scenario as failed when the page load exceeds the defined number.
Please suggest a tool that could be used for the above mentioned scenario, and if the same could be done using Jmeter that I'm missing out.
Thanks in advance..!
In JMeter you have :
Duration Assertion which you can utilize to set the response time threshold. If response time exceeds the time set in the duration assertion JMeter will automatically mark the relevant sampler(s) as failed
SMTP Sampler which can be used for sending JMeter test results to the specified recipient(s). Add a tearDown Thread Group to your Test Plan (tearDown Thread Group is being executed after all other Thread Groups), put SMTP Sampler under this tearDown Thread Group and configure it to send .jtl results file at the end of the test. See Load Testing Your Email Server: How to Send and Receive E-mails with JMeter article for example configuration.

my jmeter script is running inspite of the application server being shut down

I created a jmeter script for an MSTR application. The server on which this application is hosted was shut down by the Development team but my script is still running successfully.
Why is the script not giving errors??
In case of HTTP Requests JMeter automatically treats all HTTP Status Codes which are less than 400 as successful.
You can consider adding i.e. Response Assertion to ensure that the test is doing what it needs to do and, expected information is present at the page, not expected information is not present, etc. You can also set maximum response time via Duration Assertion, check response for being HTML/XHTML/XML-compliant via HTML Assertion, etc.
See How to Use JMeter Assertions in Three Easy Steps guide for comprehensive information on conditionally failing JMeter samplers using assertions
You are getting an impression that the script is running successfully based on the response code you are receiving. For correctness of the tests, it is advised that you add response assertions to your scripts and add certain text as a pattern which is expected as result of successful response for respective request.
In this case you also need to make sure that you don't add response assertion for each and every request as it can make the JMeter script heavy to execute and JMeter may run out of memory if appropriate memory is not allocated.
Add a response assertion and re-run the test and make practice to use it to validate the correctness of your script.

Jmeter & browser concurrent requests showing different results?

When I have given 500 concurrent users load via jmeter my server throwing error message but the same time I have called same request via browser showing proper response. How it is possible? Is there any settings in jmeter for avoiding same.
It is hard to say what can go wrong without seeing your JMeter configuration, full server response, JMeter and application under test logs and network dump for browser and JMeter.
The whole idea of performance testing is mimicking real user as close as possible, so you need at least
Add HTTP Request Defaults and set JMeter to:
Download embedded resources
Use concurrent pool of 2-5 threads
Add HTTP Cookie Manager
Add HTTP Cache Manager
Add HTTP Header Manager
Correlate any dynamic parameters
Simulate any specific application behaviour (i.e. AJAX calls)
etc.
In addition to above recommendations: ideally given "good" JMeter you shouldn't see any "response messages", you should see a number of errors in final report so double check you:
Run JMeter in non-GUI mode
Storing only those metrics which are absolutely required
Follow other recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure
beside, what Dmitri described above, I would also check the actual throughput the server returns in either cases.
Throughput depends a lot on the timers you configured in Jmeter to simulate think time.
Jmeter has no rendering and no javascript engine, so each thread is much much faster than a real browser.

Resources