Augustus.Reqnroll
0.9.0
dotnet add package Augustus.Reqnroll --version 0.9.0
NuGet\Install-Package Augustus.Reqnroll -Version 0.9.0
<PackageReference Include="Augustus.Reqnroll" Version="0.9.0" />
<PackageVersion Include="Augustus.Reqnroll" Version="0.9.0" />
<PackageReference Include="Augustus.Reqnroll" />
paket add Augustus.Reqnroll --version 0.9.0
#r "nuget: Augustus.Reqnroll, 0.9.0"
#:package Augustus.Reqnroll@0.9.0
#addin nuget:?package=Augustus.Reqnroll&version=0.9.0
#tool nuget:?package=Augustus.Reqnroll&version=0.9.0
Augustus.Reqnroll
Reqnroll (BDD/Gherkin) integration for Augustus. Automatically organizes mock caches by scenario and places them next to your feature files.
Requires the Augustus core package (installed automatically as a dependency).
Quick Start
Register your simulator in a Reqnroll [Binding] hook. Augustus.Reqnroll automatically intercepts the scenario lifecycle to route cached responses into per-scenario subdirectories next to your feature files.
using Augustus.Extensions;
using Augustus.Reqnroll;
using Reqnroll;
[Binding]
public class Hooks
{
private static APISimulator? _simulator;
[BeforeTestRun]
public static async Task BeforeTestRun()
{
_simulator = new Hooks().CreateStripeSimulator();
AugustusReqnrollContext.Register(_simulator);
await _simulator.StartAsync();
}
[AfterTestRun]
public static async Task AfterTestRun()
{
AugustusReqnrollContext.Clear();
if (_simulator is not null)
{
await _simulator.StopAsync();
await _simulator.DisposeAsync();
_simulator = null;
}
}
}
To use AI-generated responses, also install Augustus.AI and call _simulator.UseAI(...) before StartAsync.
Key Features
- Per-scenario cache isolation — each scenario gets its own cache directory, preventing collisions in parallel runs
- Automatic cache placement — mock files are stored next to your
.featurefiles in a__mocks__directory - Zero configuration — register your simulator once and the Reqnroll hooks handle the rest
- Works with all response strategies — static, file-based, AI-generated, or proxy responses all cache correctly
Cache Directory Structure
Cached responses are organized automatically by API name and scenario:
Features/
__mocks__/
Stripe/
Scenario_Name_1/
{hash}.json
Scenario_Name_2/
{hash}.json
MyFeature.feature
API
// Register a simulator (call in [BeforeTestRun])
AugustusReqnrollContext.Register(simulator);
// Retrieve a registered simulator by index
var sim = AugustusReqnrollContext.GetRegisteredSimulator(0);
// Clean up all registered simulators (call in [AfterTestRun])
AugustusReqnrollContext.Clear();
Related Packages
| Package | Purpose |
|---|---|
| Augustus | Core simulator — route matching, static responses, caching |
| Augustus.AI | AI-powered response generation and real-API proxy via OpenAI |
| Augustus.Stripe | Pre-built Stripe API defaults and fluent helpers |
| Augustus.GitHub | Pre-built GitHub API defaults and fluent helpers |
Documentation
Full documentation and examples: github.com/chrisjainsley/augustus
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.