Merged
Conversation
epszaw
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The PR introduces the following attributes to the Allure API for test authors:
stringandbyte[]return types. Uses AspectInjector under the hood.epic,feature, andstorylabels to test results at once.storyorepicandstorycan be omittedAppendis set, all texts are joined with\n\n.Appendis set, all texts are joined together with no separator.epiclabel to test results.featurelabel to test results.ALLURE_IDlabel to test results.suitelabel created from this class.ownerlabel to test results.parentSuitelabel to test results.severitylabel to test results.storylabel to test results.subSuitelabel to test results.suitelabel to test results.parentSuite,suite, andsubSuitelabels at once.subSuiteorparentSuiteandsubSuitecan be omittedtaglabels to test results.Attribute targets
Most of the attributes can be applied to a method, a class/struct, or an interface, and are propagated down to test methods:
A test result of
MyTestMethodreceives labels from all four attributes:epic,feature,story, andtag.This works in the same way for Xunit, which fixes #384.
The order of application
The following guarantees exist regarding the order in which the attributes are applied:
[AllureMeta]A new
[AllureMeta]attribute can be used to compose multiple attributes into a single one:A test result of
MyTestMethodreceives the labels and link defined by the attributes applied toMyAllureAttribute.[AllureDescription]and[AllureDescriptionHtml]These attributes set the
descriptionanddescriptionHtmlproperties of test results accordingly. When applied on multiple levels (e.g., to a class and a method of the class), the most specific wins:However, setting
Appendwill join the descriptions together:Markdown descriptions (
[AllureDescription]) are joined with a double newline (\n\n) to separate the paragraphs. HTML descriptions ([AllureDescriptionHtml]) are joined without a separator. Use block elements like<p>to keep the descriptions apart.[AllureParameter]A new attribute
[AllureParameter]can now be applied to parameters of a test method:This allows to workaround #482.
Similarly, the attribute can be applied to parameters of a step method:
Note that
Excludehas no effect on step parameters.Other changes
Allure.NUnitandAllure.Xunit. I will follow up with an optimization later that will allow samples to be nested with test classes, as having oneSamplesfolder with billions of samples inside isn't very convenient.linktype when matching against the templates.[AllureBefore]and[AllureAfter]RunInContextAsynctoAllureLifecycle.\n\n) to split markdown paragraphs.Description,Author, andCategory) is now from top to bottom (test fixture -> test -> test case). Previously, it was from bottom to top.Known issues
[AllureAfter]on NUnit's[OneTimeTearDown]The
[AllureAfter]attribute applied to a[OneTimeTearDown]method of an NUnit test fixture won't emit the teardown fixture:The reason is that when
ITestAction.Afteris called on the test fixture level, the[OneTimeTearDown]method hasn't been called yet. If we emit the container from here, it will miss the fixture result.Originally, we solved this by emitting the container from a custom aspect injected into
Allure.NUnit.Attributes.AllureAfterAttribute. The new attribute doesn't have access to this aspect. Instead, an SDK event system should be introduced that allows integrations to run custom code on events such as fixture stop.Closes #384.
Closes #406.
Closes #427.
Checklist