Allure.XUnit 2.9.4-preview.4
Allure.XUnit
Allure.XUnit is library for display xunit tests in Allure report.
Allure.XUnit supports .NET Core 2.0 and later.
Attributes:
- AllureXunit
- AllureDescription
- AllureParentSuite
- AllureFeature
- AllureTag
- AllureSeverity
- AllureIssue
- AllureOwner
- AllureSuite
- AllureSubSuite
- AllureLink
- AllureEpic
- AllureLabel
- AllureId
- AllureXunitTheory - attribute for display parametrized tests. Use
InlineData,MemberData,ClassData, XUnit attributes for pass parameters.
All methods have to be tagged by attribute AllureXunit instead of Fact, or AllureXunitTheory instead of Theory for display in allure report. Other attributes are optional.
Attributes usage
Most of the attributes can be used both on methods and classes.
| Attribute | Method | Class |
|---|---|---|
| AllureXunit | x | |
| AllureDescription | x | |
| AllureParentSuite | x | x |
| AllureFeature | x | x |
| AllureTag | x | x |
| AllureSeverity | x | x |
| AllureIssue | x | x |
| AllureOwner | x | x |
| AllureSuite | x | x |
| AllureSubSuite | x | x |
| AllureLink | x | x |
| AllureEpic | x | x |
| AllureLabel | x | x |
| AllureXunitTheory | x | |
| AllureId | x |
To override attribute value you can use overwrite param in attribute definition.
In other case multiple values will be written in test results.
Example:
[AllureSuite("Suite A")]
public class TestClass
{
[AllureXunit(DisplayName = "Test Name")]
[AllureSuite("Suite B", overwrite: true))]
public void TestMethod
{
}
}
Steps
Use AllureStepAttribute, AllureBeforeAttribute, AllureAfterAttribute
See Examples.
Allure.XUnit.StepExtensions deprecation
There is no more need to use separate Allure.XUnit.StepExtensions package - you can simple remove it from dependencies and use attributes from Allure.XUnit.Attributes.Steps namespace directly.
using Allure.XUnit.Attributes.Steps;
...
[AllureStep("Check that {someNumber} is the answer to life, the universe, and everything")]
private void NestedStep([Name("number")] int someNumber, [Skip] bool skippedBoolean = true)
{
Assert.Equal(42, someNumber);
}
Attachments
Use AllureAttachments class with it's methods. (AttachmentAttribute coming soon)
Running
Just run dotnet test.
allure-results directory with result appears after running tests in target directory.
Examples
See Examples
No packages depend on Allure.XUnit.
.NET Core 2.0
- Allure.Net.Commons (>= 2.9.4-preview.4)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
.NET 5.0
- Allure.Net.Commons (>= 2.9.4-preview.4)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
.NET 6.0
- Allure.Net.Commons (>= 2.9.4-preview.4)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
.NET Standard 2.1
- Allure.Net.Commons (>= 2.9.4-preview.4)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
| Version | Downloads | Last updated |
|---|---|---|
| 2.15.0 | 5 | 04/30/2026 |
| 2.14.1 | 7 | 03/28/2026 |
| 2.14.0 | 3 | 04/24/2026 |
| 2.13.0 | 4 | 04/24/2026 |
| 2.12.1 | 3 | 04/24/2026 |
| 2.12.0 | 4 | 04/24/2026 |
| 2.11.0 | 4 | 04/24/2026 |
| 2.10.0 | 4 | 04/24/2026 |
| 2.10.0-preview.1 | 3 | 04/25/2026 |
| 2.9.5-preview.1 | 3 | 04/25/2026 |
| 2.9.4-preview.6 | 4 | 03/30/2026 |
| 2.9.4-preview.5 | 3 | 04/25/2026 |
| 2.9.4-preview.4 | 3 | 04/30/2026 |
| 2.9.4-preview.3 | 3 | 04/30/2026 |
| 2.9.4-preview.2 | 3 | 04/25/2026 |
| 2.9.4-preview.1 | 3 | 04/25/2026 |
| 2.9.3-preview.1 | 3 | 04/25/2026 |
| 2.9.2-preview.1 | 4 | 03/30/2026 |
| 2.9.1-preview.7-nunit-fixtures | 2 | 04/25/2026 |
| 2.9.1-preview.6-nunit-fixtures | 3 | 04/25/2026 |
| 2.9.1-preview.5 | 2 | 04/25/2026 |
| 2.9.1-preview.4 | 3 | 04/25/2026 |
| 2.9.1-preview.3 | 3 | 04/25/2026 |
| 2.9.1-preview.2 | 3 | 04/25/2026 |
| 2.9.1-preview.1 | 3 | 04/30/2026 |
| 2.1.3 | 4 | 04/24/2026 |
| 2.1.2 | 4 | 04/24/2026 |
| 2.1.1 | 4 | 04/24/2026 |
| 2.1.0 | 4 | 04/24/2026 |
| 2.0.1 | 4 | 04/24/2026 |
| 2.0.0 | 4 | 04/24/2026 |
| 1.1.4 | 5 | 03/30/2026 |
| 1.1.3 | 4 | 04/24/2026 |
| 1.1.2 | 4 | 04/24/2026 |
| 1.1.1 | 4 | 04/30/2026 |
| 1.1.0 | 5 | 04/30/2026 |
| 1.0.0 | 4 | 04/24/2026 |