About the Presentation
The Road to Full Automation: How We Implemented Continuous Delivery at Signal
About the Tutorial
Workshop: Load tests automation in k6 tool
In the workshop, I will introduce the k6 tool and demonstrate its practical application in load testing. I will highlight its key benefits and explain why, in my view, k6 stands out as one of the most comprehensive yet user-friendly tools designed for implementing performance tests. The sessions will revolve around a specific test scenario that we’ll automate and refine, providing insights into the functionalities of the k6 tool and the k6 Cloud platform used for test execution. Additionally, we will implement a customized solution for visualizing metrics from load test results, leveraging InfluxDB and Grafana.
Throughout the workshop, we’ll delve into various aspects of load testing automation using the k6 tool. We’ll start with an in-depth introduction to k6, exploring its origins, evolution, and the fundamental features that distinguish it in the realm of performance testing tools.
Following this introduction, we’ll discuss the concept of shift-left testing and its significance in modern software development practices. We’ll explore how k6 facilitates this approach by empowering developers to integrate performance testing early in the development lifecycle.
Our exploration will then extend to the various types of load testing. We’ll discuss the importance of each type and demonstrate how k6 enables practitioners to conduct comprehensive load tests to uncover performance bottlenecks under different scenarios.
Moving into the practical realm, we’ll immerse ourselves in the main functionalities of k6 through hands-on examples. Participants will learn how to configure tests effectively using k6’s options, understand the structure of test scripts, and leverage features like session recording and browser recorder in k6 Cloud.
We’ll also cover advanced topics such as setting checks, thresholds, and error counters to monitor test results effectively. Participants will gain insights into organizing and categorizing test scenarios using groups and tags and distributing load across multiple test scenarios.
Furthermore, we’ll explore how to integrate external data sources into test scenarios for realistic load simulations and how to leverage the integration of k6 with InfluxDB and Grafana for advanced visualization and analysis of load test metrics.
Through a combination of presentations, practical demonstrations, and hands-on exercises, participants will gain a comprehensive understanding of k6’s capabilities and its role in enabling efficient and effective load testing in modern software development workflows.
Additional Information:
Tutorial Structure
Introduction: The Genesis and Features of k6, Duration: 20 minutes
Overview of k6, its origins, and key features. Participants will understand why k6 is a powerful tool for modern load
testing.
Shift-Left Testing Approach, Duration: 15 minutes
Exploration of the shift-left testing concept and how k6 enables early performance testing in the development cycle.
Microservices Architecture, Duration: 15 minutes
Discussion on the challenges of load testing in microservices architectures and how k6 addresses these challenges.
Load Testing Types, Duration: 10 minutes
Overview of different types of load testing and their significance. Explanation of how k6 supports various testing
scenarios.
Main Functionalities of k6: Practical Examples, Total Duration: 5 hours
1. Test Configuration, Duration: 20 minutes
Learn to configure tests using k6's options for realistic scenario simulation.
2. Test Script Structure, Duration: 20 minutes
Understanding the lifecycle and structure of k6 test scripts with best practices.
3. k6 Cloud Basics, Duration: 30 minutes
Introduction to k6 Cloud and executing tests in a cloud environment.
4. k6 Cloud Browser Recorder, Duration: 20 minutes
Using the browser recorder feature in k6 Cloud to automate test scenarios.
5. Test Scenario Refactoring, Duration: 20 minutes
Participants will learn how to refactor test scenarios for improved maintainability and efficiency.
6. Handling User Authorization, Duration: 20 minutes
Participants will learn how to handle user authorization in their load tests by managing user tokens
7. Checks, Thresholds, and Error Counters, Duration: 30 minutes
Setting checks and thresholds to monitor test results effectively.
8. Groups and Tags, Duration: 20 minutes
Organizing and categorizing test scenarios for better management using groups and tags.
9. Multi-Test Scenario Distribution, Duration: 20 minutes
Distributing load across multiple scenarios to simulate complex usage patterns.
10. Using External Data in Test Scenarios, Duration: 20 minutes
Integrating external data sources into test scenarios for realistic simulations.
11. Integration with InfluxDB and Grafana, Duration: 30 minutes
Advanced visualization and analysis of load test metrics through integration with InfluxDB and Grafana.
Key Takeaways
- Master the fundamentals of load testing with the k6 tool.
- Implement customized load test metrics visualization using Grafana.
- Execute load tests both in the cloud and on-premises.
- Gain practical experience through hands-on exercises.
Recommended Attendees
This workshop is ideal for:
- Test Engineers
- Test Automation Engineers
- Performance Test Engineers
- Developers and QA professionals interested in load testing
- Anyone new to load testing looking to implement effective performance test scenarios
Technical Requirements:
- Laptop: All participants must bring a laptop.
- Preparation: Participants should prepare by setting up the test environment and installing necessary tools.
Requirements and setup instructions can be found here: k6 Workshop Setup Guide. - Basic Programming Knowledge: Familiarity with any programming language, preferably
JavaScript/TypeScript, is beneficial but not mandatory.
Why Choose This Tutorial?
- Hands-On Approach: Engage in practical exercises rather than just theoretical discussions.
- Comprehensive Coverage: Covers fundamental concepts and practical applications, making it suitable for
those new to load testing or seeking to strengthen their foundational knowledge. - Proactive Testing: Emphasizes integrating performance testing early in development to catch issues early
and improve software quality. - Advanced Visualization: Learn to analyze and visualize test results effectively with InfluxDB and Grafana.