Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Snapshooter is a snapshot testing tool for .NET Core and .NET Framework
| Date | Stars |
|---|---|
| 2026-07-24 | 331 |
| 2026-07-25 | 331 |
| 2026-07-28 | 331 |
| 2026-07-30 | 331 |
| 2026-08-06 | 331 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day

## [](https://www.nuget.org/packages/Snapshooter.Xunit) [](https://github.com/SwissLife-OSS/Snapshooter/releases/latest) [](https://dev.azure.com/swisslife-oss/swisslife-oss/_build/latest?definitionId=6&branchName=master) [](https://sonarcloud.io/dashboard?id=SwissLife-OSS_Snapshooter) [](https://sonarcloud.io/dashboard?id=SwissLife-OSS_Snapshooter)
**Snapshooter is a snapshot testing tool for _.NET Core_ and _.NET Framework_**
_Snapshooter_ is a flexible snapshot testing tool to simplify the result validation in your unit tests in .Net. It is based on the idea of [Jest Snapshot Testing](https://jestjs.io/docs/en/snapshot-testing/).
To get more detailed information about Snapshooter, go to the [Snapshooter Docs](https://swisslife-oss.github.io/snapshooter/docs/introduction)
## Getting Started
To get started, install the Snapshooter _Xunit_ or _NUnit_ nuget package:
### XUnit
```bash
dotnet add package Snapshooter.Xunit
```
### NUnit
```bash
dotnet add package Snapshooter.NUnit
```
### MSTest
```bash
dotnet add package Snapshooter.MSTest
```
[Get Started](https://swisslife-oss.github.io/snapshooter/docs/get-started)
### Assert with Snapshots
To assert your test results with snapshots in your unit tests, follow the following steps:
#### 1. Add snapshot assert statement
Insert a snapshot assert statement `Snapshot.Match(yourResultObject);` into your unit test.
Example:
```csharp
/// <summary>
/// Tests if the new created person is valid.
/// </summary>
[Fact]
public void CreatePersonSnapshotTest()
{
// arrange
var serviceClient = new ServiceClient();
// act
TestPerson person = serviceClient.CreatePerson(
Guid.Parse("2292F21C-8501-4771-A070-C79C7C7EF451"), "David", "Mustermann");
// assert
Snapshot.Match(person);
}
```
#### 2. Run the unit test to create a new Snapshot
The `Snapshot.Match(person)` statement creates a new snapshot of your result object and stores it in the
`__snapshots__` folder. The `__snapshots__` folder is always next to your executed unit test file.
Snapshot name: `<UnitTestClassName>.<TestMethodName>.snap`
#### 3. Review new snapshot
Review your new snapshot file `__snapshots__/<UnitTestClassName>.<TestMethodName>.snap`.
#### 4. Run unit test to assert
Now the `Snapshot.Match(person)` statement will create again a snapshot of your test result and compare it against your reviewed snapshot in the `__snapshots__` folder. The `__snapshots__` folder is always next to your executed unit test file.
### Mismatching Snapshot Handling
If your result object has changed and the existing snapshot is not matching anymore, then the unit test will fail. The unit test error message will point to the exact mismatching position within the snapshot.
In addition, in the snapshot folder `__snapshots__` a subfolder with name `__mismatch__` will be created. In this folder you can find
the actual snapshot which is mismatching with the existing snapshot in the `__snapshots__` folder. Therefore it is possible to compare the two snapshots with a text compare tool.
If the snapshot in the mismatching folder `__mismatch__` is correct, just move it to the parent `__snapshots__` folder (override the existing one).
[Read More](https://swisslife-oss.github.io/snapshooter/docs/snapshot-mismatch-handling)
## Different Match-Syntax Possibilities
The default maExcerpt of 12,139 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:17b0763ab80faa5b, topic:testing