1

JMeter User Manual says: JMeter is not a browser. JMeter does not execute the Javascript found in HTML pages.

I wanted to know exact meaning of this statement.

Most perhaps every webpage have javascripts included. I am taking an example of testing single page (say home page), and as usual this page have number of js, css, images. During recording, I recorded all embedded resources. As far my knowledge, before running a test in jmeter, we have following three options 1. Take only top level request (homepage.html) without selecting embedded resources check-box 2. Take top level request (homepage.html) along with selecting embedded resources check-box 3. Keep top level request along with all other components recorded

Which among 3 is the best option to check page load time (I am assuming 1st option, as it tries to replicate close to browser)

and otherwise, if JMeter do not execute javascript, how am I getting response of js file?

2 Answers 2

1

JMeter won't execute JavaScript and won't render the page, but it will download the .js file and record and replay any AJAX call which is driven by JavaScript.

So I would suggest going for option 2, but:

  • tick "Use concurrent pool" and provide number of threads in interval of 3-8
  • filter "external" resources via "URLs must match" input
  • add HTTP Cache Manager to ensure that embedded resources are downloaded only once per thread (this is what well-behaved browsers do)

See How to make JMeter behave more like a real browser article for other tips on how to make your load test more realistic

Sign up to request clarification or add additional context in comments.

Comments

0

you can get a response of js file with browser automation tools like selenium or testIT Webtester (a fork of selenium)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.