Sample application showing how to write an ODD test suite using OddDotNet and .NET Aspire.
This sample project, along with OddDotNet/OddDotProto/OddDotCSharp, was inspired by a presentation given by Martin Thwaites at the NDC London 2023 conference. The presentation can be found here, and the original code repository found here.
This sample shows how the OddDotNet OpenTelemetry test harness, along with the OddDotCSharp client and builder, can be used to write integration and E2E automated tests using Observability Driven Development.
The OddDotNet OpenTelemetry test harness is a docker container that acts as an otel collector and provides a gRPC service for querying spans that have been generated by your application(s). The container is found here.
In addition, the OddDotCSharp repository provides a NuGet package called OddDotNet.Client, which provides a pre-built gRPC client for communicating with the container, and a SpanQueryRequestBuilder for simplifying the creation of queries against the spans your application has generated.
- .NET Aspire. For setup instructions, see Setup and tooling.
- Docker.
- Open the solution.
- There is a single test
/tests/TodoTests/GetTodoShould/UseCacheOnSecondRequest()
that demonstrates the functionality.