Simmy brings chaos engineering to .NET by integrating directly with the Polly resilience framework. Inject exceptions, artificial latency, substitute results, or any arbitrary behavior into your application’s execution paths — all without modifying your production code. Test whether your resilience strategies actually hold up before failures happen in production.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Polly-Contrib/Simmy/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get Simmy running and inject your first fault in under five minutes.
Chaos Policies
Explore all four chaos policy types: exceptions, results, latency, and behavior.
Configuration
Learn how to control injection rates, enable/disable policies, and drive chaos from external config.
API Reference
Full reference for MonkeyPolicy factory methods, options classes, and fluent builder extensions.
What can Simmy do?
Simmy provides four chaos injection policies, each targeting a different class of failure:Inject Exception
Throw any exception type at a configurable probability to test your error-handling and retry logic.
Inject Result
Substitute a fake return value (e.g., an HTTP 503) to simulate downstream service faults.
Inject Latency
Add artificial delay before a call is made to validate your timeout and circuit-breaker policies.
Inject Behaviour
Execute any arbitrary action — restart a dependency, corrupt state, or trigger an alert.
How it works
Simmy policies wrap your existing code the same way any Polly policy does. Place a Simmy policy innermost in aPolicyWrap and it will subvert the outbound call at the last moment, while your outer Polly resilience policies (retry, circuit breaker, fallback) respond to the injected chaos exactly as they would in production.
Program.cs
Install the NuGet package
Add
Polly.Contrib.Simmy to your project. See Installation for all package manager options.Define a chaos policy
Use the
MonkeyPolicy factory with a fluent builder to specify what fault to inject, how often, and under what conditions.Wrap your existing policies
Nest your Simmy policy inside a
PolicyWrap so your resilience policies can respond to the injected faults.Control chaos dynamically
Drive injection rates and enabled state from external configuration so you can toggle chaos without redeploying. See Context-Driven Chaos.
Simmy works with Polly v7.0.0 and later, targeting .NET Standard 1.1, 2.0, and 2.1.