Skip to content

[Feature]: Multi step test execution with OTEL and Aspire (Gherkin - BDD style) #5845

@AdrianoAE

Description

@AdrianoAE

Problem Statement

We have very complex flows that require a lot of setup across many services and then check many services once the processing is over, in order to make the code maintainable we use the DependsOn, as a simple example:

SetupWiremock
SendServiceBusMessage [DependsOn: SetupWiremock]
VerifyWiremockWasCalled [DependsOn: SendServiceBusMessage]

Currently the report for the Class Timeline does not show the spans for the test methods (example) and would be good if the order of execution would match the order of the spans shown

Image

Now for the problematic part with OTEL, even though I can verify while debugging that the OTEL headers are being sent in the ServiceBusMessage when sending from the test and forwarded all the way in the call chain, it never shows in the TUnit report, the traces are just lost.

The OTEL endpoints, etc. are injected in the services as per documentation, and the expectation is that they would show under the Send_message step since that's the one who actually triggers the processing. Also the traces are never sent to the Aspire dashboard as per documentation

Image

Debugging screenshots:
TUnit Sending the message

Image

Azure Function APP (running via Aspire integration)

Image

The HTTP call the App does when the processing is done

Image

TUnit verify step, I can check Wiremock that the request with the SendMessage TRACE-ID was made

Image

Proposed Solution

  • Have the traces properly propagate back to TUnit and shown under the report
  • Traces proxied to Aspire dashboard as per docs

Alternatives Considered

No response

Feature Category

Test Execution / Lifecycle

How important is this feature to you?

Nice to have - would improve my experience

Additional Context

No response

Contribution

  • I'm willing to submit a pull request for this feature

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions