---
url: https://jasperfx.github.io/alba/guide/snapshot.md
description: >-
  Snapshot test Alba scenario results with Verify and Verify.AspNetCore to
  capture the full HTTP request and response.
---

# Snapshot Testing

Although Alba does not ship built-in snapshotting support, it does easily integrate with the popular [Verify](https://github.com/VerifyTests/Verify) framework.
Given Verify and [Verify.AspNetCore](https://github.com/VerifyTests/Verify.AspNetCore) has been added and initialized for your test framework of choice, you can pass the `scenario` to `Verify()`, and response data will be captured for a complete picture of your network request.

Given a test with the shape of:

```cs
await using var host = await AlbaHost.For<global::Program>();

var scenario = await host.Scenario(s =>
{
    s.Post.Json(new MyEntity(Guid.NewGuid(), "SomeValue")).ToUrl("/json");
});

await Verify(scenario);
```

snippet source | anchor

Will result in a snapshot of:

```json
﻿{
  Context: {
    Request: {
      Headers: {
        Accept: application/json,
        Content-Length: 67,
        Content-Type: application/json,
        Host: localhost
      }
    },
    Response: {
      StatusCode: OK,
      Headers: {
        Content-Type: application/json; charset=utf-8
      },
      Value: {
        id: Guid_1,
        myValue: SomeValue
      }
    }
  }
}
```
