Open in Grafana Cloud

Complete this learning path directly in your Grafana Cloud stack with an interactive learning experience.

Test system endurance with k6 soak testing

Welcome to the Grafana learning path that builds on Run your first k6 performance test, Establish a performance baseline with k6, and Find your system’s limits with k6. Soak testing extends an average-load profile: the load level stays near what you already measured in baseline testing, but the plateau runs much longer. That longer window surfaces time-dependent problems such as memory growth, connection pool limits, disk fill, and gradual latency drift.

This path builds on Establish a performance baseline with k6. For the full k6 series sequence, consider Find your system’s limits with k6 first if you haven’t already. You practice on QuickPizza; a 30-minute learning run may show flat metrics, but the same steps (design the profile, stream to Grafana Cloud k6, watch trends, document degradation) apply to your own stack.

The diagram below shows the soak shape you build in this path: ramp up, a long plateau at moderate load, then ramp down. It follows the Soak testing overview pattern; this path uses a 30-minute plateau for learning. Production soaks often run 2 to 8 hours or longer.

Here’s what to expect

When you complete this path, you’ll be able to:

  • Explain how soak testing differs from average-load testing (duration, not load shape)
  • Design a soak profile with ramp-up, a sustained plateau, and ramp-down using k6 stages
  • Stream k6 results to Grafana Cloud k6 and read trends mid-test
  • Set degradation thresholds with abortOnFail and delayAbortEval for a learning-duration run
  • Correlate k6 metrics with infrastructure dashboards when degradation appears
  • Document degradation onset, rate, and category for follow-up work

Before you begin

Before you test system endurance with k6 soak testing, ensure that you have:

  • A Grafana Cloud account. To create an account, refer to Grafana Cloud.
  • k6 installed on your machine. To install k6, refer to Install k6.
  • Basic knowledge of JavaScript (k6 scripts are written in JavaScript).
  • A code editor such as Visual Studio Code or Cursor.
  • Access to a terminal or command line interface.

Troubleshooting

If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.

More to explore

We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.

Are you ready?