JMeter tests are failing when running with multiple iterations - jmeter

I recently started using jmeter and created my test cases under the thread group. When I run then with single user or iteration the test pass. But when I ran like 5 iterations. then 2 to 3 tests are failed. Not sure what I am missing here.
jmeter version 5.4.1
The host for the testcases are running on API, not on regular website
ex. peregrine-api-${ENV}-raven.ocp-nonprod.com
Please find the screenshots of my jmeter test setup and let me know if you need any other information
Test plan tree
Testcase settings
Results table
[
This is the response I am getting for few iterations and few runs are executing successfully
{
"message": "An error has taken place",
"errors": [
"An error has taken place"
],
"status": "INTERNAL_SERVER_ERROR"
}

INTERNAL_SERVER_ERROR is a SERVER error, for well-behaved servers it means that there is nothing wrong with the JMeter request, it's server who cannot properly handle the request so it worth checking server logs and look for the reason there
Use View Results Tree listener and compare the request which is successful with the one which fails. If you're using JMeter Properties and/or Variables - the values can be visualized using Debug Sampler
Any reason for using 2 different Thread Groups? If Create Mailbox request requires authentication it makes more sense to keep keycload auth and requests which require authentication under the same Thread Group
According to JMeter Best Practices you should always be using the latest version of JMeter so it worth considering migrating to JMeter 5.4.3 or whatever is the latest stable version which is available at JMeter Downloads page

Related

Jmeter throws 403 forbidden when calling multiple threads

I am using jmeter to perform load testing on my dev cluster. I have used HTTP Authorization Manager and have passed baseurl, username, password etc. Now my thread group have:
Number of threads:100 ,
Ramp-up period: 1 and Loop Count:1
Now for the first 50-60 calls the authorization works as expected but later it starts failing by giving error as 403. can anyone please tell me how to fix this?
I am using jmeter 5.4.1
Is there any response data? Perhaps you are getting rate limited. I also noticed you are reading in variables from a CSV. Are you sure the data in each row is correct? If you are providing auth credentials through the CSV, an incorrect row could lead to a 403.
As a side note, JMeter 5.4.1 has a log4j vulnerability, you might want to upgrade it to the latest version.
If the problem occurs under the load I can think of 2 possible reasons:
Your application gets overloaded and cannot properly handle the requests. Check your application logs and resources usage (CPU, RAM, etc.)
JMeter gets overloaded and not being able to properly send the requests. You're violating several JMeter Best Practices in particular:
you're running JMeter in GUI mode, GUI is only for tests development and debugging, when it comes to execution you should be using command-line non-GUI mode
you're using Listeners, especially View Results Tree, they don't add any value and just consuming resources
you're not using the latest version of JMeter, current stable release is 5.4.3

JMeter - returns 401 unauthorized for few test

I am using jmeter to load test a website. I have tested from 1 to 400 users. however while testing for above 500 users/threads, I am getting 401/unauthorized error for few users. Hope you'll help me to find out a solution to this problem.
I can think of 3 possible reasons:
There is a parameterization problem with your test, i.e. it sends wrong credentials, you can use i.e. Simple Data Writer configured to save requests and response data for failing requests and inspect it using View Results Tree listener.
JMeter gets overloaded and cannot properly perform correlation. In addition to point 1 check whether you're following JMeter Best Practices and ensure that JMeter has enough headroom to operate in terms of CPU, RAM, etc. using i.e. JMeter PerfMon Plugin
Your application gets overloaded and cannot handle 500+ users, check your application logs, resources usage, output of APM tools, etc.

Non Http Response code: url fail to respond Jmeter

Today i got issue Non Http Response code when run script on Jmeter. My script run over some steps (Login - view) but got this issue and have log that issue at NoHttpResponseException.
I'm using Jmeter version 3.3. And I think that maybe this issue from server side, not by my script.
Does anyone fix this issue before? Please support me to resolve it.
This status code is being returned when an Exception occurs during HTTP Request sampler execution. There are hundreds or thousands of possible exceptions and even more potential causes for them.
If it occurs only under the load - most probably it's a server side error and you need to check the application under test logs and monitoring software results to identify the cause
It might be something described in the Connection Reset since JMeter 2.10 ?
It might be the case your JMeter script is badly designed/implemented and you're sending garbage instead of proper HTTP request
So try to collect as much information as you can:
Application under test and JMeter logs (it includes any middleware such as reverse proxies, load balancers, databases, etc.)
Application under test and JMeter machines health metrics (CPU, RAM, Network, Disk, Swap)
Network layer information, i.e. HTTP Request and response details.
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.0 (or whatever is the current latest JMeter version available at Downloads page) as soon as it will be possible.

Jmeter retry services on failure

I have recorded some services in jmeter. When I run the jmeter, one of the services sometimes receives the parameters from another service(through Json Path Postprocessor) and sometimes it does not. When it does not receive the parameters, it fails. I want my jmeter to retry all the services if a service fails, beginning from start.(Through my research I found that Jmeter retry has been stopped since Jmeter 2.1 and I am using jmeter 3.1).How can I achieve that?
You can run your "services" (whatever it is) in an endless loop via While Controller and exit the loop if all the requests are successful.
There's plugin Retry Post-Processor you can add in your request(s) scope
JMeter plugin provides a Post-Processor that retries failed samples.
Minimum JMeter version 5.0

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.

Resources