Skip to content

Workloads script to make performance testing to an API using: K6 - Docker - Prometheus - Grafana

Notifications You must be signed in to change notification settings

AdrianJPT/K6_Api_performance_testing

Repository files navigation

K6_Api_performance_testing

This project make a performance test to an API(POST) "https://reqres.in/api/users" using Data Parameterization

  • Smoke test
  • Spike test
  • Stress test
  • Load test

And also add the tests in our CI/CD workfflow, file: .github/workflows/main.yml image

Prerequisites

  • The Docker version must be at least 20.10.10.
  • The containerd version must be at least 1.5.6.
  • The docker-compose version must be at least 1.28.0.

Start

Download the file en deploy the containers using "docker-compose.yml" file.

IMPORTANT Ports used for docker is 9090, 3000, 6565 Feel free to change them if it's needed

#(1)
git clone https://github.com/AdrianJPT/K6_Api_performance_testing.git

# (2)
cd K6_Api_performance_testing

# (3)
docker compose -f docker_k6-prometheus-grafana/docker-compose.yml up

Usage

k6 run -o experimental-prometheus-rw <script_test.js>

Report

  • k6 console

image

  • grafana

image


About

Workloads script to make performance testing to an API using: K6 - Docker - Prometheus - Grafana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages