Fault Injection Testing with k6

Build fault tolerant Kubernetes applications


Design for failure. Collaborate across teams to handle errors.

  • A large majority of outages result from incorrect handling of non-fatal errors.

  • Embrace and tackle errors to validate fallback logic at each layer of your infrastructure and application.

Testing application failures >

No new DSLs, no extra CLI tools. Use the k6 Javascript API.

  • Tests as code and best-in-class developer experience help adoption across engineering teams.

  • Define faults and reusable tests in a language that developers and QA engineers know.

xk6-disruptor API >

Test without additional burden. Do not require other components.

  • Connect your k6 script to the K8s cluster and start testing under application and service failures.

  • Do not require to deploy and maintain a fleet of agents or operators.

How it works >

Fault Injection to Build Resilient Distributed Systems

Failures are inevitable. Proactively test for (un)expected errors to improve the UX and system's architecture.

  • Test tolerance for internal failures

    Build your fallback strategy to prevent the propagation of internal failures disrupting your SLOs.

  • Test slow networks and delays

    Provide a good user experience in situations of poor network performance, such as on mobile networks or delayed responses.

  • Test resilience patterns

    Verify the outcome of high-availability and resilient techniques such as backoff, timeouts, retries, degradations, etc.

What our users say

Errors that I used to introduce through mocks and Traffic Controller, I can now do it within the same test using the k6 disruptor, which allows me to have all the test configurations centralized. There are still features missing, but most of the time, we need HTTP faults when running performance tests. The disruptor fits perfectly when you want to introduce delays or 5xx errors to test a circuit breaker or a retry policy.

Fault injection testing has become much easier with xk6-disruptor. By only using this xk6 extension, we can now inject faults into our Kubernetes systems and recreate application errors easily without any hassle.

Add Fault Injection to Your Reliability Testing Strategy

Test each layer of your application and infrastructure with k6. Combine fault injection with other tests to recreate incidents and improve reliability and resiliency.

  • Faults within Load Tests

    Prepare for errors by introducing common API failures as part of your existing stress, spike, and average-load tests.

  • Faults within E2E Browser Tests

    Validate the fallback logic presented to users by testing the browser experience when injecting errors, delays, and high traffic.

  • Faults within Infrastructure Tests

    Test resilience to failures and scalability when planning the architecture and capacity of your infrastructure components.

Ready to try k6 disruptor?

Get started