/k6-arch-example

pt_BR: Projeto para criação de arquitetura e esqueleto de testes de performance utilizando o k6. // en_US: Skeleton for project start for performance test using k6 and other tools.

Primary LanguageJavaScript

Sample project for performance tests using k6

Skeleton for project start for performance test using k6 and other tools, this project also has compilation with webpack for use fakerjs library for generate random data and has grafana with influxdb to follow tests in real time and docker for run all this things.

Technologies and tools used:

File Structure

📦k6-arch-example
┣ 📂dashboards
┃ ┗ 📜k6-load-testing-results.json
┣ 📂img
┃ ┗ 📜img.png
┣ 📂src
┃ ┣ 📂requests
┃ ┃ ┣ 📜login.request.js
┃ ┃ ┣ 📜products.request.js
┃ ┃ ┗ 📜users.request.js
┃ ┣ 📂simulations
┃ ┃ ┣ 📜FullFlowLoad.test.js
┃ ┃ ┗ 📜FullFlowStress.test.js
┃ ┗ 📂utils
┃ ┃ ┗ 📜utils.js
┣ 📜.gitignore
┣ 📜README.md
┣ 📜docker-compose.yml
┣ 📜grafana-dashboard.yaml
┣ 📜grafana-datasource.yaml
┣ 📜package-lock.json
┗ 📜package.json

Execution Examples

Requirements:

Without docker, influxdb and grafana:

  • With npm:
    • npm run FullFlowLoadTest
  • Without npm:
    • k6 run -e env=PRD src/simulations/FullFlowLoad.test.js

Grafana's dashboard with many graphs for performance monitoring

Doubts!? contact me:

Twitter Medium Linkedin Instagram