Introduction to k6

bg right:60% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)

for Perfomance Testing


Overview

  1. What is k6 ?
  2. What is Load testing ?
  3. Why Do Performance Testing?
  4. Load Testing vs. Performance Testing
  5. Load Test Scenarios/Types
  6. QuickPizza Demo

What is k6?


What is Load Testing ?


Why Do Performance Testing?

Benefits:


Common Excuses & Counterpoints:


Load Testing vs. Performance Testing

                Performance testing != Load testing 

Load Test Scenarios

A load test scenario combines specific values of test parameters. Each scenario recreates a certain situation or set of conditions that the application will be exposed to.

Load test scenarios are often called load test types. Some of the most common scenarios are listed here.

margin-right: 90%


Test parameters

This are the non-exhaustive list of common test parameters:


Shakeout Test

Small test to check for major issues. Sometimes known as a smoke test, checks for major issues before spending more time and resources.

Name: Shakeout Test
Total VUs: 5	
Ramp-up: 0 seconds	
Duration: 10 minutes
Ramp-Down: 0 seconds

bg right:40% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)


Average Load Test

Simulates typical production load. Typically includes ramp-up and ramp-down periods to siumalet users gradually loggin in and interact with the system. The test sustains the steady-state load siumlation for an hour or so.

 Name: Average Load Test
Total VUs: 100	
Ramp-up: 30 minutes
Steady state: 60 minutes
Ramp-down: 10 minutes
Total duration: 100 minutes

bg right:40% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)


Stress Test

simulates the traffic that the application is expected to experience at the highest point of the day or season.

a good test scenario when testing rush hours or sale periods during which the application faces abnormally heavy load.

bg right:40% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)


Soak Test :

Soak tests, also called endurance tests,

Name: Soak Test
Total VUs: 50
Ramp-up: 30 minutes
Steady state: 480 minutes
Ramp-down: 10 minutes
Total duration: 520 minutes (8 hours and 40 minutes)

bg right:40% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)


Spike Test :

A spike test, recreates a situation where the application experiences a sudden and massive increase in traffic. Spike tests are good for simulating timed events like:

Name: Spike Test	
Total VUs: 300
Ramp-up: 1 minute
Steady state: 20 minutes
Ramp-down: 5 minutes
Total duration: 26 minutes

bg right:40% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)


Breakpoint Test :

Identifies the load level at which performance degrades and build confidence in what a system can handle. The results from breakpoint tests provide valuable inputs for capacity planning.

Name: Breakpoint Test	
Total max VUs: unknown
Ramp-up: 10 minutes before each stage
Steady state: 30 minutes
Ramp-down: 0 minutes
Total duration: unknown

bg right:40% margin-right: 90% drop-shadow:0,5px,10px,rgba(0,0,0,0.6)


Demo by Grafana Labs

This demo is provided by grafana labs itself. Was named QuickPizza demo app.

Somehow k6-workshop need minor fix to run the test can view this issues for solution


Sources