PERFORMANCE TESTING

The purpose of the project:

The goal is to create a performance test template with the K6 tool, and as new updates come out, I have the opportunity to put them into practice with this project, new performance testing strategies, and also how to show metrics with greater effectiveness...

Technology used in the project:

  • K6 - is an open-source load testing tool
  • InfluxDB - is a high-speed read and write database
  • Grafana - is the open source analytics & monitoring

How do they communicate with each other:

Breaking it Down containers

docker image


How to check it out matrix from tests results:

Open a browser to http://localhost:3000/d/k6/k6-load-testing-results and I’ll have an view of my load test streaming across the page in real-time:

docker image


How to run the tests:

Before tests
  1. Requires that InfluxDB and Grafana are already running in the background. Run the command below:
    docker compose -f ./docker-compose.yml up -d influxdb grafana
Tests
  1. Run K6 tests:
    docker compose -f ./docker-compose.yml run k6 run /scripts/tests/product_page/client_side_requestes.test.js

Project hierarchy structure:

.
├── environment_configs
│   ├── ****.json
│   └── ****.json
├── datapool
│   └── ****.csv
├── tests
│   ├── cache
│   │   └── ****.test.js
│   ├── database
│   │   └── ****.test.js
│   └── product_page
│       ├── ****.test.js
│       └── ****.test.js
├── utils
│   ├── ****.js
│   └── ****.js
├── docker-compose.yml
├── grafana-dashboard.yaml
├── grafana-datasource.yaml
├── index.js
├── package-lock.json
├── package.json
└── README.md