Skip to content

This repository contains performance test examples for web applications. The test is based on the Grafana K6 tool.

License

Notifications You must be signed in to change notification settings

mkurc1/k6-performance-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance Test

This repository contains performance test examples for web applications. The test is based on the Grafana K6 tool.

How to run the test

  1. Install the K6 tool. You can find the installation instructions here.

For example, on macOS, you can install it with the following command:

 brew install k6
  1. Clone this repository.

  2. Create a config.json file based on the config.example.json file and fill in the necessary information.

  3. Run the test with the following command:

 k6 run examples/homepage_with_basic_auth.js

or with web dashboard:

 k6 run examples/homepage_with_basic_auth.js --out web-dashboard

by default, the test will run with scenario defined in the config.js file, but you can override it with the following command:

 k6 run examples/homepage_with_basic_auth.js --vus 20 --duration 40s

Your test results will be executed with 20 virtual users for 40 seconds.

Test results

The test results will be displayed in the terminal or in the web dashboard.

Terminal

Terminal

Web Dashboard

Web Dashboard

The most important metrics

  • http_req_duration: The time it took to complete the request.
  • http_req_failed: The number of failed requests.
  • iterations: Total number of iterations.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This repository contains performance test examples for web applications. The test is based on the Grafana K6 tool.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published