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.
📦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
- Installation k6
- Installation docker/docker-compose
- 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