Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Hybrid load testing using Nightwatch with JMeter or k6

Run a hybrid load test using Nightwatch scripts on BrowserStack Load Testing

Run a hybrid load test that combines your Nightwatch browser tests with a JMeter or k6 protocol load test.

Supported versions

The following framework and engine versions are recommended for hybrid load tests with Nightwatch:

Framework Node version Framework version Protocol engine
Nightwatch Node.js 24 Nightwatch 3.7.0 JMeter 5.6.3, k6 2.0.0

Prerequisites

  • BrowserStack Username and Access key. You can find these under your account profile.
  • An existing automated test suite written in Nightwatch.

Run a test

You can start a new test either from the Quick Start page or the Load Tests page on the Load testing dashboard.

On the dashboard, click Create Load Test.

Screenshot of load testing dashboard showing the run a new test button highlighted

Enter a Test Name for your load test, select Hybrid and click Upload scripts

Dashboard showing test name field and type of load test to run

Upload your scripts

The product runs a hybrid test using JMeter and Nightwatch automation projects. JMeter is used to generate API-level load, and Nightwatch drives browser-level load to simulate real user interactions.

You see two sections:

  • JMeter Script: Upload your JMeter .jmx file (up to 50MB). Drag and drop your file or click to select it.
  • Automation Project: Select Nightwatch from the dropdown as your automation framework. Then, upload your zipped project files (.zip up to 250MB). Drag and drop the file or click to select it.

Screenshot of load testing dashboard asking to add scripts for load testing

After you upload your ZIP file, the dashboard automatically validates your project. If validation is successful, you will see a confirmation message and a summary of the detected configuration and dependencies.

You can review and confirm the configuration file (your nightwatch config file) and any other dependencies (path of package.json) identified in your project.

Dashboard showing successful validation of a Nightwatch project ZIP with config and dependencies

Ensure that your package.json and nightwatch.config.js config files are placed at the root level of your project.

Both fields are mandatory for their respective test types. After uploading, click Configure Load to proceed to the next step.

You can also run load tests using the sample scripts if you want to try out the feature before uploading your own files.

You can configure the following load parameters to customize your load test:

Run test

After you finish configuring load parameters, click RUN TEST .

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle