Concurrency Unit Testing with Coyote
Coyote is .NET library and tool designed to help ensure that your code is free of concurrency bugs.
Too often developers are drowning in the complexity of their own code and many hours are wasted trying to track down impossible-to-find bugs, especially when dealing with concurrent code or various other sources of non-determinism (like message ordering, failures, timeouts and so on).
Coyote helps write powerful, expressive tests for your code. We call these concurrency unit tests. You can declare sources of non-determinism (such as timeouts and failures) as part of your Coyote tests. The Coyote testing tool can systematically explore a large number of interleavings of concurrent operations as well as non-deterministic choices so that it covers a large set of behaviors in a very short time. This is different from stress testing. Coyote takes control of the concurrency so that it can manipulate every possible scheduling. With appropriate mocking, Coyote can also do this in “developer” mode on a single laptop with little or no dependence on the bigger production environment.
Coyote is not a verification system. It does not use theorem proving to make correctness guarantees, instead it uses intelligent search strategies to drive systematic testing, based on deep understanding of concurrency primitives that you have used in your code. This approach has proven to work well for large production teams, including many teams in Microsoft Azure because it has a small barrier to entry with almost immediate benefits for those who adopt it.
Coyote does not require that a team starts from scratch and rebuilds their system. Coyote uses binary rewriting during test time to take control of the concurrency in your unmodified code. For advanced users, Coyote also provides a powerful in-memory actor and state machine programming model that allows you to build reliable concurrent systems from the ground up. This programming model allows you to program at a high-level of abstraction. Coyote actors are built using asynchronous C# APIs, supported by a lightweight runtime, making it easy to program efficient non-blocking code.
So Coyote brings together elements of design, development and testing into an integrated package that works really well in the real world. See our case studies for some great customer testimonials.
Fearless coding for concurrent software
Using Coyote gives your team much more confidence in building mission-critical services that also push the limits on high concurrency, maximizing throughput and minimizing operational costs.
With Coyote you can create highly reliable software in a way that is also highly productive.
These are some direct quotes from Azure Engineers that use Coyote:
-
We often found bugs with Coyote in a matter of minutes that would have taken days with stress testing.
-
Coyote added agility and allowed progress at a much faster pace.
-
Features were developed in a test environment to first pass the Coyote tester. When dropped in production, they simply worked from the start.
-
Coyote gave developers a significant confidence boost by providing full failover and concurrency testing at each check-in, right on their desktops as the code was written.
Explore Coyote
Get started with the following links:
Watch a video overview of Coyote
Learn about the key benefits of using Coyote
Install the NuGet package and CLI tool, it is super easy
Learn how to use Coyote in practice
Read about core concepts behind Coyote
Try to find concurrency bugs in this interactive demo
Learn how various Azure teams are using Coyote