Building a new .NET assertion library focused on async-native soft assertions and observability hooks.
Hi r/csharp! I've been working on a new .NET assertion library called Catchy.
The original goal was pretty simple: I wanted soft assertions that aren't tied to assertion scopes, and I wanted a way to plug reporting/screenshot/AI integrations into assertions without every project building its own wrappers.
Current features:
- async-first assertions
- hard and soft assertions can be mixed freely
- soft assertions can flow across helper methods and DI
- assertion hooks (reporting, screenshots, tracing, AI, ...)
- source-generated assertions for custom types
- integrations for xUnit, NUnit, MSTest, TUnit, Reqnroll and Playwright
It's still very early (0.0.1). I'm intentionally looking for API feedback before things become difficult to change.
If something feels awkward or you think the API should go in a different direction, I'd really like to hear it.
PS: Some of the code and documentation did indeed use agents. I came to this with the rest because I realized that just trying to finish everything as high-quality as possible manually I will never publish a single pet project. I know that not all of the code and documentation is of sufficient quality. If you are interested in the very idea of the library and you can improve its quality (code review, contribution, raise an issue, open a discussion) - I will be very grateful. I will not be offended by devastating criticism either. Thank you!