JavaScript SDK
Empower your JavaScript developers to create load tests.
Code and test in the same language
Your JavaScript developers write functional tests in JavaScript, now they can write load tests in the same language. Simplifying test creation and maintenance.
Include your QA team in load testing
JavaScript is a preferred language for QA testers. Use the Gatling JavaScript SDK to involve your QA team in load testing. Closer collaboration between your developers and testers can shorten your development lifecycle.
Include resources from the npm registry
Creating realistic tests often means using existing packages and libraries. Gatling allows you to import resources from npm to save time and build highly accurate tests.
Developer and QA-friendly tooling
The JavaScript SDK is written natively in TypeScript and provides all of the familiar TypeScript capabilities that developers and QA testers depend on to maintain clean, bug-free tests.
Take advantage of:
- Type definition support to work more efficiently with typed libraries and reduce debugging time.
- IDE syntax autocomplete to help ensure you call the correct function name in your script.
- Local text execution mode to debug and validate the test before deploying them to Gatling Enterprise.
Import and manipulate test resources
Load testing often requires handling vast quantities of test data, including data generated during the test used in subsequent steps. The JavaScript SDK lets you:
- Import packages and libraries to bring your existing test resources.
- Validate, store, and transform server responses.
- Programmatically import request data like authentication credentials.
- Add SLA thresholds to assess your application performance quickly.
Convert browser actions into JavaScript or TypeScript test scripts
The JavaScript SDK has a built-in web recorder for capturing user scenarios and converting them into load test scripts. Some key features include:
- Capturing browser-based actions like clicks, inputs, and natural pauses between actions.
- Handling SSL certificates for HTTPS requests
- Create clean, minimalist scripts with filters for unnecessary requests like .css files.
- Convert tests from other tools into Gatling scripts by importing HAR files
Start testing now!
Test Gatling Enterprise for free! No credit card is required.
Dive into our other features
Frequently asked questions about the JavaScript SDK
The JavaScript SDK and Gatling Enterprise are perfectly integrated. After writing load tests in your local development environment, you can package and deploy the tests to the Gatling Enterprise platform through:
- the UI
- CLI commands
- your CI/CD pipeline
The JavaScript SDK allows you to import libraries to speed up test development and write more realistic simulations. Because we rely on GraalVM to translate the tests to run on a Java Virtual Machine, we don’t have access to the Node.js SDK during runtime. This means libraries with a Node.js SDK dependency won’t work with the JavaScript SDK.
The JavaScript SDK is written in TypeScript. If you want to work with TypeScript, please see our dedicated TypeScript SDK page.