Newbie to Jmeter. How to test a dynamic DOM?



  • Trying to learn Jmeter on my own and am a little confused. I utilized the template to record my script. My steps included navigating to various pages and making simple string changes. Ran through everything and all my steps were successful but no data was populated on the UI (the string values did not populate). Someone said it was probably because the website has a dynamic DOM (we use JS methods for Selenium).

    I sincerely apologize if I haven't given enough info. Please let me know if you need it. If the dynamic DOM issue is correct, how can I rectify it? I have looked at xPath extractor and CSV data set but nothing substantial.



  • The explanation is at JMeter project main page:

    JMeter is not a browser

    JMeter is not a browser. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever viewed at a time).

    So you need to figure out how should the values be populated. If they're present in DOM but not displayed, i.e. hidden via styles, you should be good to proceed.

    However if the values are populated from the result of AJAX request - it need to be handled separately. JMeter is capable of executing HTTP requests, no matter whether they are driven by AJAX or not, but JMeter doesn't actually render anything. So just make sure that your test is realistic and requests that are being sent by JMeter match the ones, sent by a browser.

    See How To Make JMeter Behave More Like A Real Browser article for few tips and tricks.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2