Allure.XUnit
2.9.4-preview.1
See the version list below for details.
dotnet add package Allure.XUnit --version 2.9.4-preview.1
NuGet\Install-Package Allure.XUnit -Version 2.9.4-preview.1
<PackageReference Include="Allure.XUnit" Version="2.9.4-preview.1" />
paket add Allure.XUnit --version 2.9.4-preview.1
#r "nuget: Allure.XUnit, 2.9.4-preview.1"
// Install Allure.XUnit as a Cake Addin #addin nuget:?package=Allure.XUnit&version=2.9.4-preview.1&prerelease // Install Allure.XUnit as a Cake Tool #tool nuget:?package=Allure.XUnit&version=2.9.4-preview.1&prerelease
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.0
- Allure.Net.Commons (>= 2.9.4-preview.1)
- AspectInjector (>= 2.8.1)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
-
.NETStandard 2.1
- Allure.Net.Commons (>= 2.9.4-preview.1)
- AspectInjector (>= 2.8.1)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
-
net5.0
- Allure.Net.Commons (>= 2.9.4-preview.1)
- AspectInjector (>= 2.8.1)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
-
net6.0
- Allure.Net.Commons (>= 2.9.4-preview.1)
- AspectInjector (>= 2.8.1)
- xunit.assert (>= 2.4.1)
- xunit.core (>= 2.4.1)
- xunit.runner.reporters (>= 2.4.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Allure.XUnit:
Package | Downloads |
---|---|
Allure.Xunit.StepExtensions
Allure.Xunit.StepAttribute |
|
TiendaOnline
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.12.1 | 27,201 | 6/4/2024 |
2.12.0 | 11,709 | 4/2/2024 |
2.11.0 | 83,061 | 11/29/2023 |
2.10.0 | 23,552 | 10/16/2023 |
2.10.0-preview.1 | 211 | 9/22/2023 |
2.9.5-preview.1 | 12,809 | 3/22/2023 |
2.9.4-preview.6 | 420 | 2/13/2023 |
2.9.4-preview.5 | 129 | 2/13/2023 |
2.9.4-preview.2 | 161 | 1/2/2023 |
2.9.4-preview.1 | 127 | 12/30/2022 |
2.9.3-preview.1 | 126 | 12/23/2022 |
2.9.2-preview.1 | 229 | 9/19/2022 |
2.9.1-preview.7-nunit-fixtures | 293 | 8/2/2022 |
2.9.1-preview.6-nunit-fixtures | 151 | 7/27/2022 |
2.9.1-preview.5 | 157 | 7/27/2022 |
2.9.1-preview.4 | 172 | 7/14/2022 |
2.9.1-preview.3 | 166 | 7/12/2022 |
2.9.1-preview.2 | 169 | 7/12/2022 |
2.1.3 | 66,869 | 6/9/2022 |
2.1.2 | 577 | 6/9/2022 |
2.1.1 | 1,636 | 4/7/2022 |
2.1.0 | 803 | 4/6/2022 |
2.0.1 | 46,774 | 11/10/2021 |
2.0.0 | 14,601 | 8/16/2021 |
1.1.4 | 662 | 6/18/2021 |
1.1.3 | 2,858 | 5/31/2021 |
1.1.2 | 4,883 | 4/27/2021 |
1.0.0 | 8,624 | 12/25/2020 |