This project demonstrates different types of Performance Testing with K6:
- Smoke Testing: Quick tests to check the basic functionality of the application.
- Load Testing: Evaluates how the system behaves under expected load conditions.
- Stress Testing: Determines the system's robustness by testing beyond normal operational capacity.
- Spike Testing: Assesses system performance under sudden, sharp increases in load.
- Soak (Endurance) Testing: Tests the system's stability and performance over an extended period.
- Breakpoint Testing: Identifies the point at which the system fails or its performance degrades significantly.
Grafana is used for real-time monitoring and visualization of performance test results.
- Install Grafana: Download and install Grafana from the official site.
- Set Up Dashboards:
- Create a new dashboard and add panels for metrics like response time, throughput, and error rate.
- Connect to data sources like Prometheus or k6 Cloud for real-time data.
- Integration with k6:
- Export metrics from k6 to Grafana by configuring output plugins like
--out influxdb
or--out prometheus
.
- Export metrics from k6 to Grafana by configuring output plugins like
If you prefer a hosted solution, Grafana Cloud provides easy setup and integration with k6.
- Sign Up: Register for a Grafana Cloud account here.
- Connect to k6: Link your k6 metrics to Grafana Cloud for live visualization.
k6 Cloud simplifies running performance tests and provides detailed reports.
- Create a Grafana Cloud account:
- Use an existing account or register at Grafana Cloud.
- Navigate to k6 Cloud:
- After registration, access the k6 Cloud section at k6 Cloud.
- Log in to k6 Cloud:
- Use the k6 CLI to connect to your account with an API token.
k6 login cloud --token {your-token}
- View metrics like latency, throughput, and error rates in real time on Grafana dashboards.
- Analyze trends and identify performance bottlenecks using Grafana's visualization tools.
For any questions or suggestions, please open an issue in the repository.
This project is licensed under the MIT License. See the LICENSE file for details.