can I save responses with apache bench? - apachebench

I am getting non 200 responses when i execute ab against an application, but I cannot replicate the failures in other ways.
Is there a way to save only those non-200 responses?

Related

Getting 400 bad request when uploading attachment on Jmeter

I recorded uploading an attachment (pdf file) using blazemeter plugin, then open the jmx file using Jmeter. I modified uploads tab as in the following image and placed pdf file under bin directly. when i run the script i got 400 bad request , could you please advise what might be the issue?
As per 400 Bad Request status code description:
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).
So I would recommend using a 3rd-party sniffer tool like Fiddler or Wireshark to capture the requests originating from JMeter and the real browser and compare them.
Requests must be exactly the same (apart from dynamic parameters which need to be correlated), once you amend your JMeter configuration so it will send the same request as the real browser does your file upload will be successful.
We cannot suggest anything meaningful unless we see successful and failing requests dumps fully (URL, headers and body)

JMeter marks the request with response code 429 as failed in the Report and ResultsTree

I am testing rate limiting features of an API.
And I have a JMeter HTTP sampler request, for which the anticipated and actual response code is HTTP 429, Too many requests.
But in the Results Tree and in the generated HTML report, this request's response is marked as failure, even though the actual response is 429 and the Response assertions is also for code 429.
Because of this my overall report is skewed with 100% failures, whereas actually everything has passed.
I need ideas on how to fix this Jmeter reporting issue.
Check the attached screencap of the Response in ResultsTree
Of course it does, all HTTP status codes above 399 and below 500 are so called "client errors", in general JMeter treats response status codes above 399 as errors.
If status code 409 is something you expect you can configure JMeter to expect it as well, it can be done using Response Assertion configured like:
More information: How to Use JMeter Assertions in Three Easy Steps

Signalr load testing in JMeter

I'm trying to do JMeter script for an application with Signalr protocol.
I'm able to identify connection-token, bearer-token, connection-id and co relate with request using long polling transport and receive message, but after third polling I could not receive the correct response, i'm getting response but not the expected and full response.
Could you please help me what could be the issue here?
I'm afraid no one will be able to help without seeing at least:
Anticipated response
Actual response
Reference requests sequence from i.e. real browser captured with a sniffer tool like Wireshark or Fiddler
The same as point 3 but for JMeter instead of the real browser.
Basically you need to execute points 3 and 4 and compare the generated network requests - they must be the same apart from the dynamic parameters (tokens, connection-id, etc.). Given requests are the same - you should be getting the same responses.
Another option is using While Controller in order to continue polling unless response matches your expectation.

Firefox not sending request after response 500

As you guys can see below when I am trying to upload a file XLSX into my API in Firefox, if XLSX does not have all columns that I need to map it to a class, I will throw an Exception and it will return a status 500. If I do not change the file I will get error 500 infinite times. Like below
After some requests it does not send anymore. And it only happens when I change the file, the 4th request below should return status 200. When I debug my application in spring it is not even entering the endpoint.
In Chrome I do not have this problem, I can sent a lot of requests and the behavior is different. Do you guys know if firefox has some security to prevent multiple requests like this? If I reload the page and send the 4th request alone it will return status 200.
I am using Angular 5 + Spring Boot

Getting 400 Bad request error when sending huge amont of data with post

I am using yahoo YUI Ajax call to post request.
Page is developed in JSP and server is Tomcat 6 and using Struts 2.x.
While i am sending small amount of data using Ajax call post request it is working fine.But when i am sending huge amount of data i am getting 400 bad request error.
The 400 error comes when The Web server thinks that the data stream sent by the client (e.g. your Web browser ) was 'malformed' i.e. did not respect the HTTP protocol completely. So the Web server was unable to understand the request and process it.
There could be possibilities that data is too large, so you should better encode the data using java script inbuilt function for example escape().
Please check maxPostSize attribute of Connector in conf/server.xml.
See the following doc for the details
In Tomcat, when the post data exceeds the maximum specified in maxPostSize (server.xml) it returns a 400 as error code

Resources