https://github.com/gatling/gatling-js-demo
Showcase of the Gatling JavaScript and TypeScript DSL.
https://github.com/gatling/gatling-js-demo
gatling javascript js npm ts typescript
Last synced: 4 months ago
JSON representation
Showcase of the Gatling JavaScript and TypeScript DSL.
- Host: GitHub
- URL: https://github.com/gatling/gatling-js-demo
- Owner: gatling
- Created: 2024-05-07T07:23:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-02T11:36:11.000Z (4 months ago)
- Last Synced: 2025-06-02T20:19:46.583Z (4 months ago)
- Topics: gatling, javascript, js, npm, ts, typescript
- Language: TypeScript
- Homepage: https://gatling.io
- Size: 426 KB
- Stars: 9
- Watchers: 8
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatling JS - JavaScript and TypeScript demo projects
A simple showcase of JavaScript and TypeScript NPM projects using Gatling JS. Please also check out the [introduction to JavaScript scripting](https://docs.gatling.io/tutorials/scripting-intro-js/) in the Gatling documentation.
## Prerequisites
You need [Node.js](https://nodejs.org/en/download) v18 or later (LTS versions only) and npm v8 or later (included with Node.js).
## Use demo project
Run the typeScript sample:
```shell
cd typescript
npm install
npx gatling run --typescript --simulation basicSimulation # automatically download Gatling runtime, build the project, and run the basicSimulation simulation
```Or the JavaScript sample:
```shell
cd javascript
npm install
npx gatling run --simulation basicSimulation # automatically download Gatling runtime, build the project, and run the basicSimulation simulation
```You can also launch the [Gatling Recorder](https://docs.gatling.io/tutorials/recorder/) and use it to capture browser-based actions and help create a realistic user scenario:
```shell
npx gatling recorder
```The `gatling` command-line tool has a built-in help function:
```shell
npx gatling --help # List all available commands
npx gatling run --help # List options for the "run" command (--help also works for all other available commands)
```## Included helper scripts
Note that both sample projects include a few aliases in the `package.json`'s `scripts` section, which you can use for convenience or refer to as examples:
```shell
npm run clean # Delete Gatling bundled code and generated reports
npm run format # Format code with prettier
npm run check # TypeScript project only, type check but don't build or run
npm run build # Build project but don't run
npm run basicSimulation # Run the included basicSimulation simulation
npm run recorder # Starts the Gatling Recorder
```