k6-arch-example
k6-arch-example copied to clipboard
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.
Sample project for performance tests using k6
Você pode acessar a documentação em português aqui
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:
- Installation k6
- Installation docker/docker-compose
Without docker, influxdb and grafana:
- With npm:
-
npm run FullFlowLoadTest
-
- Without npm:
-
k6 run -e env=PRD src/simulations/FullFlowLoad.test.js
-
- Using docker you can follow grafana in real time accessing the url of Grafana's Dashboard