Skip to content

Allure integration with xUnit.net v3 MTP#665

Open
delatrie wants to merge 76 commits into
mainfrom
xunitv3
Open

Allure integration with xUnit.net v3 MTP#665
delatrie wants to merge 76 commits into
mainfrom
xunitv3

Conversation

@delatrie

@delatrie delatrie commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Note

This PR will be merged as soon as the required changes are introduced in Allure.Net.Commons to support steps, fixtures, and the runtime API - this is a work in progress now.

Summary

Adds the new Allure.Xunit.v3 adapter for xUnit.net v3 projects running on Microsoft Testing Platform.

The integration:

  • registers Allure through the MTP builder hook when UseMicrosoftTestingPlatformRunner=true;
  • reports xUnit.net v3 lifecycle events, metadata, parameters, and failures to Allure; does not support fixtures, steps, and attachments yet (Runtime API support will be added soon).
  • ships a source generator that applies the assembly-level setup and generates Allure-aware entry point helpers;
  • supports Allure test plans with early xUnit.net pre-execution filtering;
  • allows custom Allure registration and custom entry points through AddAllureXunit, AllureXunitEntryPoint, and AllureXunitRunner.

This also updates the shared MTP/testing infrastructure with cancellation support, sample-project MSBuild property support, stronger assertions, and global error/attachment checks.

Documentation

Adds README coverage for:

  • required packages and UseMicrosoftTestingPlatformRunner;
  • out-of-box result location;
  • basic attribute usage;
  • configuration discovery;
  • test plan behavior;
  • custom Allure registration;
  • custom entry points;
  • supported MSBuild properties and troubleshooting.

Public XML documentation was added and polished for the new xUnit v3 APIs and generator-produced helpers.

Extra changes

  • Use the Publish configuration for packaging in test.yml.
  • Add support for solution-wide sample properties to integration test projects.
  • Add support for MTP TestResults as the default parent directory for allure-results to the sample runner.
  • Add support for test result cancellation (discarding) to Allure.TestingPlatform as the last resort for test plan filtering.
  • Add global attachment/error assertions to Allure.Testing.
  • Improved failed assertion messages.
  • Switch from strict ordered matching to perfect matching (all items in any order) for root collections (test results, containers, globals).
  • Ignore pre-run mode for tests that depends on custom configuration, arguments, or environment.
  • Provide the ReadAllureResults API from the sample runner to test projects.
  • Do not throw an exception if no Allure results were produced in the pre-run flow. This should be up to the test to decide is it correct or not.

delatrie added 26 commits July 9, 2026 20:36
@delatrie delatrie added pr:new feature Pull requests that add new user-facing functionality. and removed type:new feature labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:new feature Pull requests that add new user-facing functionality. theme:build theme:mtp theme:workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support xunit.v3

3 participants