Skip to content

braxtonb/jmeter-node-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JMeter Node.js Example

Overview

An example project that utilizes JMeter to simulate client requests for an Express.js server.

Getting Started (macOS instructions)

JMeter

  1. Install JMeter
  2. Symlink jmeter to your /usr/local/bin/ directory
ln -s ~/Downloads/apache-jmeter-5.4.1/bin/jmeter /usr/local/bin/jmeter

Node.js

Run the following from the root directory

  1. Install dependencies, npm install

Run the following from the node-example-api directory

  1. Install dependencies, npm install
  2. To run a dev build, npm run dev
  3. To create a production build, npm run build
  4. To run a production build, npm start

Load Testing

Running Tests

  1. To start a load test, ensure the Express server is running.
  2. Run npm run ntl and select one of jmeter:simulate:<command> scripts. May require a chmod to change file permissions to execute the shell scripts.
  3. Monitor and observe any of the following:
    • JMeter reports in the reports directory. Run npm run ntl and select a report to view in browser
    • Sample logs in samples directory
    • Output logs in logs/jmeter.log
    • Express server logs in its running terminal

Looking for what each npm script does? Try npm run ntl to select a script to run from a list of commands and their descriptions.

Example

2021_08_13_jmeter_example_run.mov

JMeter Metrics

Logs are recorded in the logs directory and sample results are recorded in the samples directory.

Thread group specific dashboard reports are output to the reports directory.

Note: The reports directory and its subdirectories are created by the postinstall npm script.

Useful Links

About

An example project that utilizes JMeter to simulate client requests for an Express.js server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors