Qyrus > Resources > Blogs > Discover the Power of Chaos Testing

Discover the Power of Chaos Testing

What is Chaos Testing?

Chaos Testing or Chaos Engineering is the discipline of experimenting on a system in order to build confidence in the system’s capability to withstand turbulent conditions in production. 

What does this mean for software testing? And how can chaos engineering be implemented? 

Traditionally most of the research and principles of chaos engineering and testing have been on physical chaos – network disruptions, over-consumption of memory, CPU, etc.; we believe there is much more to chaos testing and engineering. 

Qyrus has always focused on reusability and with many of our newer features, we are also focusing on repurposing. For example, repurposing a functional web test into a load-generating performance test, “repurpose a virtualized API into a chaos inducing agent.” 

Chaos Testing with Qyrus API Process Testing

An ecommerce API process test on Qyrus
An ecommerce API process test on Qyrus

In the image above, you can see an ecommerce API process test on Qyrus which represents a set of orchestrated API calls that are made when an order is placed. As you can see, to successfully place an order after the user submits it from the UI, the system has to check for payment status, inventory, shipment dates, CRM, etc. All of these APIs must function as expected, in time, and in correct order for this transaction to be successful. 

If you are responsible for testing the above system, here are just a few of the possible things that can go wrong: 

  1. The individual APIs don’t respond in time or in other words, they don’t stick to the SLA. 
  2. Any one or multiple APIs violate the contract. For example, the OrderID was supposed to be an integer which is 9 digits long and one of the APIs sends an alphanumeric 9 digits. 
  3. An API Schema is changed without notice. 

In a well-orchestrated system with hundreds of APIs working in sync, one API going rogue by having any one or more of the 3 issues mentioned above can induce enough functional chaos in the system. As a result, this affects many other processes than just placing an order. How well is this system designed to handle such conditions gracefully? 

Qyrus SV + API Process Testing = Functional Chaos Testing 

The critical question here is, how are testing teams equipped today to test for the above situations? At Qyrus, we have solved this exact problem through a combination of API Process Testing and Service Virtualization (test doubles). 

Building an API process test is simple – just reuse functional tests and create connections to transfer data between endpoints to represent a real-world workflow; any of the APIs in this test can be virtualized by building and hosting it through our Service Virtualization module. 

Service Virtualization in Qyrus, unlike a standard approach, gives freedom to teams using it to build their virtualized APIs with no code and have complete control of request – response pairs, persistence of data, delay induction, codeless schema design, and synthetic data generation. 

The virtual API in the process test can be programmed to go rogue by delaying the response, violating the contract based on a certain request from other real APIs in the system, or passing incoherent data. By doing so, teams can perform a “What if?” on all the 3 conditions above and ensure the system handles the situations gracefully with proper error codes and statuses. 

Contact us at questions@qyrus.com or join our waitlist to try out chaos testing with Qyrus. 

cta-background
cta-background
app icon
Are You an Enterprise Client

Looking for a Custom Solution for Your Business?

Contact Us