Xcepto.RabbitMQ
9.1.0
dotnet add package Xcepto.RabbitMQ --version 9.1.0
NuGet\Install-Package Xcepto.RabbitMQ -Version 9.1.0
<PackageReference Include="Xcepto.RabbitMQ" Version="9.1.0" />
<PackageVersion Include="Xcepto.RabbitMQ" Version="9.1.0" />
<PackageReference Include="Xcepto.RabbitMQ" />
paket add Xcepto.RabbitMQ --version 9.1.0
#r "nuget: Xcepto.RabbitMQ, 9.1.0"
#:package Xcepto.RabbitMQ@9.1.0
#addin nuget:?package=Xcepto.RabbitMQ&version=9.1.0
#tool nuget:?package=Xcepto.RabbitMQ&version=9.1.0
Xcepto.NET
Xcepto is a BDD testing framework for distributed systems. Tests are specified declaratively here.
Getting Started
Test specification happens according to the Given-When-Then pattern.
Mental model
Test steps are not immediately executed when called! They are compiled into a state machine, where transition depends on the specified conditions.
The states are linked in a chain:
[Start] -> [First] -> [Second] -> [Third] -> [Final]
The test passes, if the Final state was reached before a timeout.
Given
Xcepto.Given introduces a specification environment based on a scenario.
XceptoTest.Given(scenario, builder =>
{
// Declare test behaviour here
}
Scenario classes specify instructions to setup and prepare the system under test.
When (Actions)
Actions often require interfacing technologies. Official adapters can be used to integrate some popular ones.
XceptoTest.Given(scenario, builder =>
{
var rest = builder.RegisterAdapter(new XceptoRestAdapter());
// When
rest.PostRequest<SomeRequest, SomeResponse>(
"localhost:3000/", new SomeRequest(),
someReponse => someResponse.value > 1000);
}
Post requests in particular also enable response validation (so they are hybrid action/expectation).
Then (Expectations)
Expectations represent transition conditions.
RabbitMQ can be used to block transition until a certain kind of message is published.
XceptoTest.Given(scenario, builder =>
{
var rabbitMq = builder.RegisterAdapter(new XceptoRabbitMqAdapter(config));
// When some Action happens
// Then expect a certain response
rabbitMq.EventCondition<ResponseMessage>(
e => e.someValue == 1234);
}
Full example
Expect that the backend message bus publishes Search(Component)SearchedForArticle
whenever the client initiates a Process with a SearchForArticleRequest.
[Test]
public async Task Test()
{
// Arrange
var config = CustomRabbitMqConfig.GetRabbitMqConfig();
var searchForArticleRequest = new SearchForArticleRequest
{
ArticleName = "Christmas Tree"
};
SearchForArticleRoute articleRoute = new SearchForArticleRoute();
var postUrl = new Uri($"http://localhost:8080/{articleRoute.Path}");
await XceptoTest.Given(new ChristmasGiftsScenario(), builder =>
{
var rest = builder.RegisterAdapter(new XceptoRestAdapter());
var rabbitMq = builder.RegisterAdapter(new XceptoRabbitMqAdapter(config));
// When
rest.PostRequest<SearchForArticleRequest, SearchForArticleResponse>(
postUrl, searchForArticleRequest, _ => true);
// Then
rabbitMq.EventCondition<SearchSearchedForArticle>(
e => e.ArticleName == searchForArticleRequest.ArticleName);
});
}
Here, ChristmasGiftsScenario starts the production environment using docker compose.
The message bus also has to be configured, GetRabbitMqConfig returns a configuration
that describes the exchanges, queues and keys and references the docker container as a host.
Adapters
Xcepto supports several technologies through adapters.
Core library:
- Xcepto
Adapters:
- Xcepto.RabbitMQ (listening for messages)
- Xcepto.REST (sending POST requests, validating POST responses)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 7.1.2)
- Xcepto (>= 9.1.0)
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 |
|---|---|---|
| 9.1.0 | 114 | 2/6/2026 |
| 9.0.0 | 114 | 2/3/2026 |
| 8.1.0 | 119 | 1/31/2026 |
| 8.0.0 | 117 | 1/31/2026 |
| 7.0.1 | 217 | 12/4/2025 |
| 7.0.0 | 681 | 12/2/2025 |
| 6.4.1 | 201 | 11/26/2025 |
| 6.4.0 | 202 | 11/25/2025 |
| 6.3.0 | 157 | 11/23/2025 |
| 6.2.0 | 255 | 11/22/2025 |
| 6.1.0 | 233 | 9/22/2025 |
| 6.0.0 | 200 | 9/20/2025 |
| 5.3.51 | 189 | 9/9/2025 |
| 5.3.50 | 199 | 9/8/2025 |
| 4.2.43 | 178 | 9/6/2025 |
| 3.2.40 | 147 | 9/5/2025 |
| 3.1.35 | 225 | 8/30/2025 |
| 3.1.31 | 220 | 8/30/2025 |
| 3.0.28 | 215 | 8/30/2025 |
| 2.0.22 | 233 | 8/30/2025 |