Xcepto.Internal.Http 10.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Xcepto.Internal.Http --version 10.3.0
                    
NuGet\Install-Package Xcepto.Internal.Http -Version 10.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xcepto.Internal.Http" Version="10.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xcepto.Internal.Http" Version="10.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Xcepto.Internal.Http" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Xcepto.Internal.Http --version 10.3.0
                    
#r "nuget: Xcepto.Internal.Http, 10.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Xcepto.Internal.Http@10.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Xcepto.Internal.Http&version=10.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Xcepto.Internal.Http&version=10.3.0
                    
Install as a Cake Tool

Xcepto.NET

test pipeline codecov semantic-release: conventional-commits dotnet: netstandard2.0

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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Xcepto.Internal.Http:

Package Downloads
Xcepto.Rest

REST adapter for Xcepto testing library

Xcepto.SSR

SSR adapter for Xcepto testing library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.4.2 155 4/8/2026
10.4.1 167 2/28/2026
10.4.0 204 2/20/2026
10.3.0 178 2/14/2026
10.2.0 159 2/13/2026
10.1.0 157 2/13/2026
10.0.3 256 2/12/2026