Microsoft has announced the release of Coyote, an open-source .NET framework that guides developers toward designing, implementing, and testing code in a way that embraces non-determinism and asynchrony and to help them create asynchronous systems. 

The testing tool controls every source of non-determinism defined, including the exact order of every asynchronous operation, which allows it to systematically explore all the possibilities, according to Microsoft. 

Coyote originally evolved from a previous Microsoft Research project called P# which is a combination of a programming model, a lightweight runtime, and a testing infrastructure all packaged as a portable library with minimal dependencies. It supports both an ‘asynchronous tasks’ programming model (in preview) as well as an ‘asynchronous actors’ programming model. 

“Coyote fully understands the semantics of actors and can do a world-class job of testing them and finding even the most subtle bugs,” Akash Lal, senior principal research at Microsoft, wrote in a blog post. “The framework goes one step further, providing a type of actor called a state machine, which knows how to fully test, ensuring every state is covered and every state transition is tested.”

The framework includes a wrapper on .NET tasks, as well as Actor, StateMachine, and Event base classes, specification & monitoring to embed checks into code that can be verified at test time, timer to model timing activities in a system, and logging – a feature that allows users to see debug messages in context with decisions being made during a Coyote test run.

“The Coyote programming models are easy to use, so even with minimal investment, you get the huge upside of a powerful testing tool that automatically finds bugs in your code. And the more time and resources you invest in Coyote, the greater the benefits,” Microsoft wrote. 

Additional details on the project are available here.