I was given with a task in which I need to check load time of webpages in Jmeter and there is not any api's available. so hot to perform load testing without having api's.
1 Answers
Add HTTP Request sampler and configure it to hit the page which you need to measure
At the "Advanced" tab tick
Retrieve All Embedded Resources
andParallel Downloads
boxes, in addition you can exclude external domains there as well to limit JMeter to only your application:More information: Web Testing with JMeter: How To Properly Handle Embedded Resources in HTML Responses
Add HTTP Cache Manager to your Test Plan (real browsers download embedded resources like images, scripts, styles, fonts, but do this only once)
- Add HTTP Header Manager to your Test Plan and configure it to send headers which browsers normally send like User-Agent, Accept, etc.
- Add HTTP Cookie Manager to handle cookies
That's it, now you should have more or less realistic page load time. Remember that JMeter is not a browser so it doesn't execute JavaScript so if there are any JavaScript-generated calls - you will need to add a separate HTTP Request sampler per call and put them all under Parallel Controller