XBullet.EasyTesting.AzureFunctions
1.0.18
dotnet add package XBullet.EasyTesting.AzureFunctions --version 1.0.18
NuGet\Install-Package XBullet.EasyTesting.AzureFunctions -Version 1.0.18
<PackageReference Include="XBullet.EasyTesting.AzureFunctions" Version="1.0.18" />
<PackageVersion Include="XBullet.EasyTesting.AzureFunctions" Version="1.0.18" />
<PackageReference Include="XBullet.EasyTesting.AzureFunctions" />
paket add XBullet.EasyTesting.AzureFunctions --version 1.0.18
#r "nuget: XBullet.EasyTesting.AzureFunctions, 1.0.18"
#:package XBullet.EasyTesting.AzureFunctions@1.0.18
#addin nuget:?package=XBullet.EasyTesting.AzureFunctions&version=1.0.18
#tool nuget:?package=XBullet.EasyTesting.AzureFunctions&version=1.0.18
XBullet.EasyTesting.AzureFunctions
In-memory test infrastructure for .NET isolated Azure Functions, including function contexts, middleware, bindings, retry state, Durable orchestration activity dispatch, and fluent trigger data.
The package targets .NET 8, .NET 9, and .NET 10.
Install
dotnet add package XBullet.EasyTesting.AzureFunctions
Example
await using var host = AzureFunctionTestHost.CreateBuilder()
.AddFunction<ProcessOrderHttpFunction>()
.Build();
var request = host.HttpRequest(nameof(ProcessOrderHttpFunction))
.WithMethod(HttpMethod.Post)
.WithUrl("/api/orders")
.WithJsonBody(new CreateOrderRequest("order-42", 3))
.Build();
var function = host.GetRequiredService<ProcessOrderHttpFunction>();
var response = await function.RunAsync(request, request.FunctionContext);
Builders are available for HTTP, timer, Kafka, Service Bus, Queue Storage, Blob, Event Grid, and Event Hubs triggers.
Use UseScenarioResource(name, resource) to register borrowed state implementing the shared
ITestScenarioResource contract, then RunInTestScenarioScopeAsync to reset it before and after
setup, multiple invocations, and assertions. Scenarios on one host are serialized, and every
invocation still owns a fresh DI scope. FunctionScenario and FunctionScopedTest provide guarded
domain setup and a test runner without an ASP.NET factory. The package references
XBullet.EasyTesting for shared scenario resource, cleanup, and diagnostic contracts.
Invocation and scenario failures attach TestScenarioDiagnostics before cleanup. Original
exceptions and cancellation tokens are preserved when cleanup fails; aggregated cleanup errors
are attached in exception.Data. Registered resources remain caller-owned. Host singleton services
persist between scenarios unless they participate in the registered reset lifecycle.
Durable orchestrators can use TestOrchestrationContext to record activity scheduling and dispatch
each call to a real activity instance:
var activity = new CreateOrderActivity(dependency);
var context = new TestOrchestrationContext(async call =>
call.ActivityName switch
{
nameof(CreateOrderActivity) =>
await activity.RunAsync((CreateOrderRequest)call.Input!),
_ => throw new InvalidOperationException($"Unexpected activity '{call.ActivityName}'."),
});
var result = await orchestrator.RunAsync(context);
Assert.Equal(nameof(CreateOrderActivity), context.ActivityCalls.Single().ActivityName);
Limitations
Only CallActivityAsync is emulated; Durable runtime operations such as timers, external events,
sub-orchestrators, and replay state throw NotSupportedException.
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Microsoft.Azure.Functions.Worker.Core (>= 2.52.0)
- Microsoft.Azure.Functions.Worker.Extensions.Http (>= 3.3.0)
- Microsoft.Azure.Functions.Worker.Extensions.Timer (>= 4.3.1)
- Microsoft.DurableTask.Abstractions (>= 1.26.0)
- XBullet.EasyTesting (>= 1.0.18)
-
net8.0
- Microsoft.Azure.Functions.Worker.Core (>= 2.52.0)
- Microsoft.Azure.Functions.Worker.Extensions.Http (>= 3.3.0)
- Microsoft.Azure.Functions.Worker.Extensions.Timer (>= 4.3.1)
- Microsoft.DurableTask.Abstractions (>= 1.26.0)
- XBullet.EasyTesting (>= 1.0.18)
-
net9.0
- Microsoft.Azure.Functions.Worker.Core (>= 2.52.0)
- Microsoft.Azure.Functions.Worker.Extensions.Http (>= 3.3.0)
- Microsoft.Azure.Functions.Worker.Extensions.Timer (>= 4.3.1)
- Microsoft.DurableTask.Abstractions (>= 1.26.0)
- XBullet.EasyTesting (>= 1.0.18)
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 |
|---|---|---|
| 1.0.18 | 0 | 10/4/2026 |
| 1.0.17 | 57 | 10/1/2026 |
| 1.0.16 | 75 | 9/30/2026 |
| 1.0.15 | 81 | 9/29/2026 |
| 1.0.14 | 84 | 9/27/2026 |
| 1.0.13 | 93 | 9/26/2026 |
| 1.0.12 | 87 | 9/25/2026 |
| 1.0.11 | 89 | 9/24/2026 |
| 1.0.9 | 86 | 9/24/2026 |
| 1.0.8 | 95 | 9/21/2026 |
| 1.0.7 | 89 | 9/19/2026 |
| 1.0.6 | 102 | 9/18/2026 |
| 1.0.5 | 85 | 9/18/2026 |
| 1.0.4 | 82 | 9/15/2026 |
| 1.0.3 | 89 | 9/15/2026 |
| 0.2.0 | 90 | 9/15/2026 |
| 0.1.0 | 89 | 9/14/2026 |