Skip to content

feat: Add Allure.TestingPlatform MTP core (MMVP) #554#656

Open
grootstebozewolf wants to merge 3 commits into
allure-framework:mainfrom
grootstebozewolf:feature/xunit-v3-mtp
Open

feat: Add Allure.TestingPlatform MTP core (MMVP) #554#656
grootstebozewolf wants to merge 3 commits into
allure-framework:mainfrom
grootstebozewolf:feature/xunit-v3-mtp

Conversation

@grootstebozewolf
Copy link
Copy Markdown

Context

Following up on the discussion in #554 and feedback from the closed #654.

This is a very small, reviewable first piece implementing an MTP-first core as suggested by the maintainer.

What’s included

  • New Allure.TestingPlatform package (framework-agnostic, targets net8.0)
  • AllureDataConsumer implementing IDataConsumer – handles TestNodeUpdateMessage and maps terminal states (Passed/Failed/Skipped/Error/Timeout/Cancelled) to Allure lifecycle (Schedule → Start → Update → Stop → Write)
  • TestApplicationBuilderExtensions.AddAllure() extension method for easy registration
  • Basic NUnit smoke tests verifying consumer registration and extension metadata

Intentional limitations (for follow-up PRs)

  • No test duration mapping yet (durations ≈ 0)
  • No labels, parameters, attachments, steps, or fixtures
  • No MSBuild .props auto-registration (manual builder.AddAllure() for now)
  • No xUnit.v3 specific layer (planned as next piece)

This matches the requested approach: MTP-first, small incremental PRs, and discussion before heavy work.

cc @delatrie


Checklist

grootstebozewolf and others added 3 commits May 9, 2026 07:15
Adds an empty packable library `Allure.TestingPlatform` targeting
`net8.0` and referencing `Microsoft.Testing.Platform`. This is the
foundation for a framework-agnostic Allure adapter that consumes MTP
messages and drives `AllureLifecycle`. Framework-specific layers
(xUnit.v3, etc.) will sit on top.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implements `AllureDataConsumer`, an `IDataConsumer` that handles
terminal test states (Passed / Failed / Skipped / Error / Timeout /
Cancelled) by issuing a single `Schedule -> Start -> Update -> Stop ->
Write` sequence on `AllureLifecycle.Instance` under a per-consumer
lock. `InProgress` is a no-op for now; timing is therefore
approximate and will be addressed by a follow-up that reads
`TimingProperty`.

`AddAllure()` is provided as an `ITestApplicationBuilder` extension
so test hosts opt in with `builder.AddAllure()`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three NUnit tests pin the consumer's IDataConsumer/IExtension surface
so refactors of the contract show up as test failures:
DataTypesConsumed advertises TestNodeUpdateMessage, IsEnabledAsync
returns true, and the extension metadata (Uid / DisplayName /
Description / Version) is populated. End-to-end lifecycle assertions
will follow once the consumer's mapping grows beyond the current
happy path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant