Skip to content

Sample application showing how to write an ODD test suite using OddDotNet and .NET Aspire.

License

Notifications You must be signed in to change notification settings

OddDotNet/Sample-AspireTodoApp

Repository files navigation

Sample-AspireTodoApp

Sample application showing how to write an ODD test suite using OddDotNet and .NET Aspire.

Inspiration

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.

Prerequisites

  1. .NET Aspire. For setup instructions, see Setup and tooling.
  2. Docker.

Getting Started

  1. Open the solution.
  2. There is a single test /tests/TodoTests/GetTodoShould/UseCacheOnSecondRequest() that demonstrates the functionality.

About

Sample application showing how to write an ODD test suite using OddDotNet and .NET Aspire.

Topics

Resources

License

Stars

Watchers

Forks

Languages