admin管理员组文章数量:1400524
I am currently load testing my panies new webpage and have used JMeter for this task. We have an assessment which pulls down javascript locally to the users machine which allows them to take a test, once pleted tests are uploaded back to the database.
The issue I'm having is that it is well documented that JMeter is not a browser and does not interact with javascript. We need a way to test the time it takes for requests to browse to the page assessment and how long it takes to pull. It is also required to up the amount of requests over a specific period of time so we can determine at what point the server falls over.
I have also tried using Gatling however I am running into the same issue. Has anyone else ran into these problems and how did they get around this?
Thanks in advance!
I am currently load testing my panies new webpage and have used JMeter for this task. We have an assessment which pulls down javascript locally to the users machine which allows them to take a test, once pleted tests are uploaded back to the database.
The issue I'm having is that it is well documented that JMeter is not a browser and does not interact with javascript. We need a way to test the time it takes for requests to browse to the page assessment and how long it takes to pull. It is also required to up the amount of requests over a specific period of time so we can determine at what point the server falls over.
I have also tried using Gatling however I am running into the same issue. Has anyone else ran into these problems and how did they get around this?
Thanks in advance!
Share Improve this question asked Dec 13, 2017 at 10:15 Jfegan91Jfegan91 1471 gold badge3 silver badges11 bronze badges3 Answers
Reset to default 3Very few tools run downloaded JS code in the client/VU threads when executing a load test, for performance reasons mainly. You can try Selenium Grid or some online service based on it, like https://www.loadbooster./ or Blazemeter, but if you want to run tests in your own environment, Selenium Grid may be your only choice.
The alternative is to emulate the JS client side code when you script the load test scenario. Many tools can do that, at some level, but to make translation of existing JS code easier, I would choose a tool that offers a real scripting language, such as e.g. Grinder, Locust, Wrk or k6 (or possibly Gatling). k6 may be the simplest as you script it in Javascript, so translating the client-side JS code should be somewhat less work there.
- https://k6.io
- https://gatling.io/
- https://locust.io
- https://github./wg/wrk
- http://grinder.sourceforge/
You need to split your test into 2 major areas:
JavaScript processing happens solely on client side and you need to test it separately, the majority of modern web browsers e with developer tools allowing testing the performance of JavaScript execution:
- Firefox Developer Tools - Performance
- Chrome DevTools - Analyze Runtime Performance
- Profiling JavaScript performance
- Server side impact is the fact of downloading the JavaScript and uploading the results, you should be able to mimic the corresponding calls using JMeter's HTTP Request sampler, check out Performance Testing: Upload and Download Scenarios with Apache JMeter article for more details.
See built in JavaScript profiler inside of developer tools inside every browser. This is a question tied to single definition of a browser/os/machine/running Apps/browser extensions question, not one of multi user performance
本文标签: jmeterLoad Testing Javascript on a WebpageStack Overflow
版权声明:本文标题:jmeter - Load Testing Javascript on a Webpage - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744271505a2598205.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论