I am trying to load test a webapp, which has following functonality
1. Login in app (setting some cookie variables )
2. Serach customer with some parameter
3. Get detail of particular customer
4. Logout from webapp
When i am running Jmeter i am getting status code 404
Any reference or help will be appriciated.
After googling i found 4** says you have sent bad request.
To check what request has been sent i am using fiddler and capturing original request (which is working from browser ) and request sent by Jmeter , I am comparing data under Inspector tab in Headers in fiddler, Is this right way to resolve the issue of 4**. What else i can do to fix this issue ?
Screen shots attached
I think, the HTTP header manager and HTTP cookie manager must be pushed up just before Recording Controller. Otherwise the requests are made without these header or cookie informations.
If you doing localhost testing should in the cookie manager config domain
localhost:8080.
You can see the request/response in View Results Tree. Just click on the tab Request or Response data respectively. If you're getting a 404, chances are the Response data tab will contain the 404 with (hopefully) information about the values that are invalid or missing.
Related
I am trying to do a performance testing for a project where the main URL performs a redirection and the redirection URL returns the token needed to proceed further.
I recorded the script with Jmeter and i can see that the main URL does the redirection with status code as "302" as expected and has the "Location" header in the response body.
But when the redirection URL is hit after the main URL as the sub sample, it returns "307 temporary redirection" in response header and an error message in the response body as "java.lang.IllegalArgumentException: Missing location header in redirect for GET "
I checked the same scenario in Neoload and i could notice that request sent in Neoload for rediection URL is same as the one sent in JMeter, the response header also matches. But Neoload was able to display the response body with the expected token. In Jmeter, it returned the error message.
Can someone clarify why the response body is not displayed in Jmeter if the same request can work in Neoload. I made sure there is no difference in the request header/body sent for the main URL.
I am pretty sure the issue is related to Jmeter but not sure how to get the proper response body.
Maybe there is more than one redirect and JMeter doesn't follow it.
You can play with Redirect automatically and/or Follow redirects boxes in HTTP Request sampler
also you can use a third-party sniffer tool like Wireshark or Fiddler to inspect which requests are actually being sent, pay attention to literally everything: URL, headers, body, etc.
It should also be possible to disable handling redirects in JMeter completely and extracting the redirect target from the Location header using Regular Expression Extractor or Boundary Extractor and manually add the next request giving the extracted URL in the "Path" field of the HTTP Request sampler
JMeter URL redirection challenges from 302 to 200 status code
I'm trying to perform URL HTTP connection authentication with JMETER and facing challenges on redirection URL with JMeter from 302 to 200 status code within the organization environment. The office environment using windows authentication NTLM2 methods.
However I’m facing URL redirection blockage when I tried to navigate through an internal website as it stops when it reaches 302 status code and failed to navigate further to status code 200 through JMeter but when I display the same URL with chrome browser, it able to successfully display the web with status code 200 using chrome browser.
How does the URL Authentication work?
at 1st the given URL which includes end-user parameters were entered to display the web messages.[shows HTTP status code 302]
The URL then redirects to another portal login URL to acknowledge the authentication.[shows HTTP status code 302]
Problem/Issue:-
The URL only successfully performing the 1st 2 options but it failed to perform the final redirection to have status code 200
At the moment the HTTP result in Jmeter through "View Result Tree" and "View Result Table" is both showing status code 302
Limitation
I couldnt install any external chrome pluggin due to the security restriction within the given operating system environment
proxy has been included. in both "HTTP default Advance" option and "HTTP Advance" option with the relavent user proxy details, id and password
Additional Details
The website were build part of the liferay framework using java spring.
We notice through jmeter logs viewer that the "Pooling HTTP Connection Manager" being shut down as well.
I've included the log viewer from the JMETER in here
Challenges
I'm not sure what further configuration i should do to allow the 3rd redirection to be happened.
You need to add HTTP Authorization Manager, change "Mechanism" to BASIC_DIGEST and provide your domain and Windows credentials there
This way JMeter will be able to build a proper Authorization header and you will be able to proceed to your application
More information: Windows Authentication with Apache JMeter
In my Vuejs application on calling API to make a payment and I get 303 as status code and In the header, I can see Location:
http://local.xyz.in:1024/payment-success
In the browser's network console, I can see log for
http://local.xyz.in:1024/payment-success
but the page doesn't redirect to payment-success page and show following error on the console
Failed to load http://local.xyz.in:1024/payment-success:
Response to preflight request doesn't pass access control check: No
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'null' is therefore not allowed access.
Thank you in advance.
You are running into CORS issues. There are several ways to fix/workaround this.
Turn off CORS. For example how to turn off cors in chrome
Use a plugin for your browser
Trying to test a sample endpoint for a workflow that I configured as follows:
POST https://mycompany.flowgear.net/bizrules/validation/gstCheck/?name={businessName}&number={businessNumber}&date={startDate}&canID={candidateID}&pID={placementID}
I tested that endpoint on a browser with this, but it gives me a JSON with "There is no service at this location":
https://mycompany.flowgear.net/bizrules/validation/gstCheck/?name=ZV Consulting Inc.&number=83848 5183&date=09/02/2014&canID=309731&pID=3835
What am I doing wrong?
You're binding to POST so you can't open the URL in a browser as your browser is performing a GET. To test you'd need to use the Postman plugin and set the method to POST.
One thing to note though is that Postman makes cross origin requests so you need to set Allowed Origins to * in your Flowgear site detail screen (same place you set your vanity domain).
Some of my site users are unable to call any api endpoints successfully whether through AJAX or a direct GET request in the browser. All HTML pages work fine. They get the following error when hitting an API endpoint.
--
--
What can be the issue here? I am suspecting some kind of firewall/ISP/Network restriction may be causing this, but I am not sure. What can I do to debug the issue? I checked my server logs and the request is hitting my server and the right response is being sent back. I am using rails 3.
UPDATE
Figured out the issue. The client's firewall is blocking application/json content.
The client's firewall is blocking all content of mime type application/json