Orleans.FSharp.Testing
1.0.0
See the version list below for details.
dotnet add package Orleans.FSharp.Testing --version 1.0.0
NuGet\Install-Package Orleans.FSharp.Testing -Version 1.0.0
<PackageReference Include="Orleans.FSharp.Testing" Version="1.0.0" />
<PackageVersion Include="Orleans.FSharp.Testing" Version="1.0.0" />
<PackageReference Include="Orleans.FSharp.Testing" />
paket add Orleans.FSharp.Testing --version 1.0.0
#r "nuget: Orleans.FSharp.Testing, 1.0.0"
#:package Orleans.FSharp.Testing@1.0.0
#addin nuget:?package=Orleans.FSharp.Testing&version=1.0.0
#tool nuget:?package=Orleans.FSharp.Testing&version=1.0.0
Orleans.FSharp.Testing
Test utilities for Orleans.FSharp grains -- in-process clusters, mocks, property-based testing, and log capture.
Components
TestHarness
Wraps an Orleans TestCluster with memory storage, memory streams, and integrated log capture. Start and tear down a full in-process silo in a few lines:
let! harness = TestHarness.createTestCluster ()
let grain = harness.Client.GetGrain<IMyGrain>(grainId)
// ... test grain calls ...
do! harness.Cluster.StopAllSilosAsync()
GrainMock
A MockGrainFactory that implements IGrainFactory with predefined grain responses. Useful for unit testing grain-to-grain interactions without a real silo:
let factory = MockGrainFactory()
GrainMock.withGrain<IMyDep> "key" myMockImpl factory
GrainArbitrary
TypeShape-based auto-generator of FsCheck Arbitrary instances for F# discriminated unions. Automatically discovers DU cases and field types to produce well-typed random grain states.
FsCheckHelpers
commandSequenceArb<'Command>-- generates non-empty command sequencesstateMachineProperty-- verifies a state invariant holds after folding a command list
LogCapture
CapturingLogger / CapturingLoggerFactory -- an in-memory ILogger implementation that records structured log entries (CapturedLogEntry) for test assertions on log level, template, properties, and exceptions.
Dependencies
Microsoft.Orleans.TestingHostFsCheck 3.xTypeShapexunit
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- FsCheck (>= 3.3.2)
- FSharp.Core (>= 10.1.201)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- Microsoft.Orleans.TestingHost (>= 10.0.1)
- Orleans.FSharp (>= 1.0.0)
- Orleans.FSharp.Runtime (>= 1.0.0)
- TypeShape (>= 10.0.0)
- xunit (>= 2.9.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-alpha.1 | 55 | 4/28/2026 |
| 1.0.0 | 116 | 4/3/2026 |