2

I am currently load testing my companies 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 completed 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!

3 Answers 3

3

Very 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.com/ 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.

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

1 Comment

Every tool which supports a GUI Virtual User has the option of running a full browser. This is, inherently, a single user problem to solve as Javascript runs inside of a browser. And, if you run tens or hundreds of actual browsers per host then your resources to devote to JavaScript execution inside of browser instances will not match the resource pool of an individual user for what JavaScript execution will look like on a particular host
2

You need to split your test into 2 major areas:

  1. JavaScript processing happens solely on client side and you need to test it separately, the majority of modern web browsers come with developer tools allowing testing the performance of JavaScript execution:

  2. 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.

Comments

0

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

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.