Response Code: 404 when running Jmeter Test - jmeter

I want to performance testing using Jmeter.
Example url: "http://localhost:4200/xxx/yyy/zzz"
And I use:
server name or ip: localhost
port: 4200
path: /xxx/yyy/zzz
As a result Jmeter given Error 404 : Not Found
Can you help me?

As per 404 Not Found status code documentation:
The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource. Links that lead to a 404 page are often called broken or dead links and can be subject to link rot.
So double check your Path and make sure that the relevant resource exists on your server.
If you don't experience the error in the browser I would recommend recording your test scenario using JMeter's HTTP(S) Test Script Recorder or JMeter Chrome Extension.

Related

Using JMeter 5.4.1 recording .Net application gets either wrong response or Error response Code: 500

Using:
JMeter version 5.4.1
Browsers:
MS Edge 94.0
Google Chrome: 94.0
FireFox: 92.0.1
Using JMeter to record .Net application. 90% of the recording was perfectly fine. no page crashed and received the response correctly. Except, when I made any requests that related to permission.aspx or permission.asp page I got error message have shown below or wrong response content displayed on the page.
I did try to change the record type from httpclient4 to Java but it didn't help.
Also Error log from JMeter log showed: Cause: java.io.IOExeption: Server returned HTTP response code: 500 for URL: https://xxxx.xx.xx.com/
USERID:
ASP.Net EXCEPTION:
StatusCode:
200
Error Message:
Exception of type 'System.Web.HttpUnhandledException' was thrown.
Inner Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
Your question provide sufficient level of details so I doubt you will get a comprehensive answer, it looks like JMeter isn't capable of handling some specific setup of your application.
In order to get more information you could:
Increase logging level verbosity for JMeter's HTTP(S) Test Script Recorder by adding the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.http.proxy" level="debug" />
then inspect jmeter.log file for any suspicious entries
Check your application logs as HTTP 5xx errors are server-side errors so most probably the reason can be found there
You might also want to try out an alternative way of recording a JMeter test: JMeter Chrome Extension which is kind of less "invasive" and "alien" to the browser than JMeter's proxy server.

JMeter, In what way could a 20M file upload give an 500 error: "Cannot delete temporary file chunk"?

Context: Trying to upload a file to a web application
Let's assume I'm only using the basic options:
HTTP Request Sampler:
Method: Post
Protocol: http
Path: /api/file/upload
Follow Redirects: checked
Use Keep-Alive: checked
Use multipart/form-data: checked
Files Upload:
File Path: C:\Users\etc...etc
Parameter Name: file
MIME: image/jpeg
Cookies are set with Cookie Manager, Login is also set.
Uploading small files (130KB) works fine like this, Bigger files throw an error 500: "Cannot delete temporary file chunk."
On-website upload works fine and uses resumable.js (which is also the one throwing this error I assume)
I am assuming this is due to chunking, since that's basically the only major difference between what I have tried. Does anyone have any insight on this?
Edit: Using the image photoGood that is "chunked"/split in 2 blocks I can also form POSTs with these parameters:
resumableIdentifier 20702285-photoGoodjpg
resumableFilename photoGood.jpg
resumableType image/jpeg
resumableRelativePath photoGood.jpg
resumableChunkSize 1048576
resumableChunkNumber 1
resumableTotalChunks 2
resumableTotalSize 1859876
resumableChunkSize 887520
However, only the ChunkNumber 1 will be used, as in, the chunks are not joined together on the server.
I think your request is missing some mandatory parameters like:
resumableChunkNumber
resumableChunkSize
resumableTotalSize
resumableIdentifier
resumableFilename
resumableRelativePath
etc.
Check out documentation at http://www.resumablejs.com/ website for more details.
If you're able to successfully perform upload using browser you should be able to record the associated request(s) using JMeter's HTTP(S) Test Script Recorder, just make sure to copy your PDF file to "bin" folder of your JMeter installation before uploading the file and JMeter will generate the relevant HTTP Request sampler(s) under the Recording Controller.
Check out Recording File Uploads with JMeter article for more details.
It would also be good to capture the traffic from JMeter and the real browser using a 3rd-party sniffer tool like Fiddler or Wireshark, this way you will be able to identify the differences. Once you configure JMeter to send the same requests as the real browser - the whole transaction will be successful.

JMeter's HTTP Request file throws 404 error

JMeter HTTP Request - 404 ERROR
While I run my jmx file, It throws a 404 error for one of the HTTP Request file. Screen shot is given above.
Can anyone please suggest some solution for this issue.
There is an embedded resource call for the /favicon URL which is not found therefore the request fails.
You should raise an issue as HTTP 404 errors might cause SEO consequences so your site will rank lower
If you don't care about the embedded resources errors you can add the next line to user.properties file:
httpsampler.ignore_failed_embedded_resources=true
JMeter restart will be required to pick the property up.

jmeter removes slash (/) from requested URL's

I requested a web page using Jmeter with "Retrieve all embedded resources" enabled. When I ran the scenario, some URLs' of pictures did not open with the error "Bad Request". When I compared the working URL and URL that Jmeter checks, I realized that / is missing on the URL that Jmeter checks.
Screenshot
Screenshot2
What should I do to fix this?
It looks like a bug in JMeter.
You should submit a bug following this doc:
http://jmeter.apache.org/issues.html
Ensure you attach:
- the HTML page content that contains the links
- The jmeter.log
- A sample test plan
I tried the same with the version 2.13. No problem, which means that version 3.3 is buggy in terms of this issue.

Jmeter - Performance test

I want to load test my web site.
I can extract all http requests from the site and put it on J meter.
But the page have alot more things(like ajax calls)
How can i load test my site (find complete page load time)
I'd go the route of capturing the AJAX calls as past of your script - you have two options:
The JMeter proxy:
http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf
BlazeMeter's JMeter chrome extension:
https://chrome.google.com/webstore/detail/blazemeter-the-load-testi/mbopgmdnpcbohhpnfglgohlbhfongabi/details?hl=en
Jmeter is Server side load testing tool and though client is using ajax still http request will be sent to server which will be recorded/scripted in jmeter and thus load testing can be carried out.
please check similar questions on jmeter
check this also
http://jmetertips.blogspot.in/2009/04/ajax-testing-with-jmeter.html

Resources