Skip to content
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
e9faead
feat(xunit.v3): add xunit.v3
delatrie Jun 30, 2026
a36e79d
chore(xunit.v3): fix example project build
delatrie Jul 1, 2026
f75915d
fix(xunit.v3): support --no-build when packing
delatrie Jul 1, 2026
50686f0
chore(xunit.v3): fix dotnet pack warnings in test.yml
delatrie Jul 1, 2026
2c25b2f
test(xunit.v3): add test project
delatrie Jul 2, 2026
fa8de33
test(xunit.v3): configure test project
delatrie Jul 6, 2026
832660d
test(xunit.v3): add Allure ID test
delatrie Jul 6, 2026
8cdcbdb
test(xunit.v3): introduce CancellationToken
delatrie Jul 6, 2026
56bfd06
test(xunit.v3): add BDD attribute tests
delatrie Jul 6, 2026
83bcf31
test(xunit.v3): limit concurrency
delatrie Jul 6, 2026
993a583
test(xunit.v3): fix namespaces
delatrie Jul 6, 2026
24082fa
test(xunit.v3): add label attribute tests
delatrie Jul 6, 2026
8da6a36
refactor(mtp): simplify ReadConfiguration
delatrie Jul 6, 2026
c992b5e
refactor(mtp): code format
delatrie Jul 6, 2026
4257ec2
test: show numbers instead of indices on errors
delatrie Jul 6, 2026
c4d2ef8
test: ident -> indent
delatrie Jul 6, 2026
7f9db01
test: add json property name in error messages
delatrie Jul 6, 2026
40911ff
test: use perfect match for tests and containers
delatrie Jul 6, 2026
8aedd06
test: fix runner command arguments in stdout
delatrie Jul 6, 2026
3a9fdf1
test(xunit.v3): fix sample namespaces
delatrie Jul 6, 2026
9c65408
test(xunit.v3): add global and env label tests
delatrie Jul 6, 2026
debbcf3
test(xunit.v3): fix code format
delatrie Jul 6, 2026
084ca98
test: fix registry entry results directory for MTP projects
delatrie Jul 6, 2026
0eb45b5
test(xunit.v3): add more attribute API tests
delatrie Jul 6, 2026
ac9e5f8
feat(xunit.v3): set default suites from test class
delatrie Jul 6, 2026
c8a3faa
test(xunit.v3): combine name tests
delatrie Jul 6, 2026
3ebee01
fix(xunit.v3): fix missing test updates
delatrie Jul 6, 2026
ba57024
test(xunit.v3): add lifecycle tests
delatrie Jul 6, 2026
1c6d29e
test(xunit.v3): add xunit metadata tests
delatrie Jul 6, 2026
ddeecca
feat(xunit.v3): support failExceptions direct match
delatrie Jul 6, 2026
1f996d1
test(xunit.v3): add ctor and data source failure tests
delatrie Jul 6, 2026
ff6dffa
test(xunit.v3): fix NRE when no failExceptions provided
delatrie Jul 6, 2026
2f00d47
test(xunit.v3): fill thread label
delatrie Jul 6, 2026
8deb3cb
test(xunit.v3): add async tests
delatrie Jul 6, 2026
ccb6461
test: add globals assertions
delatrie Jul 7, 2026
ea82699
test(xunit.v3): add watchdog tests
delatrie Jul 7, 2026
84cdd10
test: make ReadAllureResults public
delatrie Jul 7, 2026
54455e9
test: fix runner directory ownership transfer
delatrie Jul 7, 2026
80109ba
fix(xunit.v3): crop testplan fullName by [ instead of <
delatrie Jul 7, 2026
01ffc7b
test(xunit.v3): add cli args tests
delatrie Jul 7, 2026
ac37645
test(xunit.v3): add testplan tests
delatrie Jul 7, 2026
ca02609
chore(xunit.v3): remove example project
delatrie Jul 7, 2026
5a63e40
test: disable pre-run flow for incompatible inputs
delatrie Jul 7, 2026
0ae02af
chore: enable xunit.v3 tests in CI
delatrie Jul 7, 2026
857153c
chore: ignore sample run errors
delatrie Jul 7, 2026
d583dc4
test: support sample solution-level msbuild props
delatrie Jul 7, 2026
c6f838e
test(xunit.v3): set UseMicrosoftTestingPlatformRunner in solution pro…
delatrie Jul 7, 2026
9a7a34f
feat(xunit.v3): guard allure registration behind UseMicrosoftTestingP…
delatrie Jul 7, 2026
71fc325
feat(xunit.v3): add UseMicrosoftTestingPlatformRunner diagnostic
delatrie Jul 7, 2026
28961cc
feat(xunit.v3): add entry point helpers
delatrie Jul 8, 2026
ffe1a03
feat(xunit.v3): tune source generator
delatrie Jul 9, 2026
6c2c24f
fix(xunit.v3): fix generator
delatrie Jul 10, 2026
d6cee19
fix(xunit.v3): avoid short-circuiting in composite message handler
delatrie Jul 10, 2026
fbbbbb5
fix(xunit.v3): rename AllureTestingPlatformServices -> AllureXunitMtp…
delatrie Jul 10, 2026
7cad2a4
fix(xunit.v3): rename CommunicationFunctions -> XunitMessageMapping
delatrie Jul 10, 2026
4dd77e4
fix(xunit.v3): rename AddXunitPreExecutionFilters -> AddXunitPreExecu…
delatrie Jul 10, 2026
adc860d
docs(xunit.v3): fix typos
delatrie Jul 10, 2026
73a9795
refactor(xunit.v3): remove stale ref
delatrie Jul 10, 2026
f2a64d0
fix(xunit.v3): fix disabled attribute case
delatrie Jul 10, 2026
aef092a
test(xunit.v3): cover explicit attribute case
delatrie Jul 10, 2026
9f073b8
test(xunit.v3): cover disabled self-registration
delatrie Jul 10, 2026
a14af3d
test(xunit.v3): cover custom entry point
delatrie Jul 10, 2026
ac5df97
test(xunit.v3): cover RunAsync helper
delatrie Jul 10, 2026
7f5c35c
test(xunit.v3): cover pre-filter setup skip
delatrie Jul 10, 2026
089bc58
test(xunit.v3): cover runtime-guard filter
delatrie Jul 10, 2026
22e6440
feat(mtp): support test cancellation
delatrie Jul 10, 2026
9e0f9e5
feat(xunit.v3): omit results filtered by runtime guard from being wri…
delatrie Jul 10, 2026
51d0069
test(xunit.v3): better coverage for test plan
delatrie Jul 10, 2026
eb0a08f
docs(xunit.v3): add xml doc comments
delatrie Jul 10, 2026
a6dde85
docs(xunit.v3): polish xml doc comments
delatrie Jul 10, 2026
2631631
refactor(xunit.v3): remove unused composite message handler
delatrie Jul 10, 2026
d57110f
docs(xunit.v3): add README
delatrie Jul 10, 2026
e4914d7
chore(xunit.v3): actualize labeler
delatrie Jul 10, 2026
6fdd282
refactor(mtp): factor out test result finalization function
delatrie Jul 10, 2026
4cc2012
test: do not throw if pre-run produced no results
delatrie Jul 10, 2026
b0a7e01
test(xunit.v3): fix pre-run on disabled registration test
delatrie Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@
- any-glob-to-any-file:
- "src/Allure.TestingPlatform/**"
- "tests/Allure.TestingPlatform.Tests/**"

"theme:xunit.v3":
- changed-files:
- any-glob-to-any-file:
- "src/Allure.Xunit.v3/**"
- "src/Allure.Xunit.v3.Generator/**"
- "examples/Allure.Xunit.v3.Mtp.Examples/**"
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Test
env:
SOLUTION_PATH: allure-csharp.slnx
BUILD_CONFIGURATION: 'Release'
PACK_CONFIGURATION: 'Publish'

on:
workflow_dispatch:
Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:
dotnet pack ${{ env.SOLUTION_PATH }}\
--no-restore\
--no-build\
--configuration ${{ env.BUILD_CONFIGURATION }}
--configuration ${{ env.PACK_CONFIGURATION }}

- name: Build test samples
run: |
Expand All @@ -62,6 +63,7 @@ jobs:
-p:Allure_SampleConfiguration=${{ env.BUILD_CONFIGURATION }}

- name: 'Run test samples'
continue-on-error: true
run: |
dotnet msbuild ${{ env.SOLUTION_PATH }}\
-t:Allure_RunTestSamples\
Expand All @@ -85,6 +87,10 @@ jobs:
--no-restore\
--no-build\
--configuration ${{ env.BUILD_CONFIGURATION }}
npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-xunit-v3" -- dotnet run --project ./tests/Allure.Xunit.v3.Tests\
--no-restore\
--no-build\
--configuration ${{ env.BUILD_CONFIGURATION }}
npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-specflow" -- dotnet test ./tests/Allure.SpecFlow.Tests\
--no-restore\
--no-build\
Expand Down
9 changes: 9 additions & 0 deletions allure-csharp.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
<Project Path="src/Allure.Xunit/Allure.Xunit.csproj">
<BuildType Solution="Publish|*" Project="Release" />
</Project>
<Project Path="src/Allure.Xunit.v3/Allure.Xunit.v3.csproj">
<BuildType Solution="Publish|*" Project="Release" />
</Project>
<Project Path="src/Allure.Xunit.v3.Generator/Allure.Xunit.v3.Generator.csproj">
<BuildType Solution="Publish|*" Project="Release" />
</Project>
</Folder>
<Folder Name="/tests/">
<Project Path="tests/Allure.Net.Commons.Tests/Allure.Net.Commons.Tests.csproj">
Expand Down Expand Up @@ -96,6 +102,9 @@
<Project Path="tests/Allure.Xunit.Tests/Allure.Xunit.Tests.csproj">
<Build Solution="Publish|*" Project="false" />
</Project>
<Project Path="tests/Allure.Xunit.v3.Tests/Allure.Xunit.v3.Tests.csproj">
<Build Solution="Publish|*" Project="false" />
</Project>
</Folder>
<Folder Name="/Solution Items/">
<File Path=".gitignore" />
Expand Down
6 changes: 6 additions & 0 deletions build/Allure.Build.Tasks/FillSampleMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class FillSampleMetadata : Task
[Required]
public string ProjectDirectory { get; set; }

[Required]
public string TestingPlatform { get; set; }

[Required]
public string SampleSolutionDirectory { get; set; }

Expand Down Expand Up @@ -145,6 +148,9 @@ void SetResultsDirectory(ITaskItem2 item)
this.BinDirectory,
item.GetMetadata("ProjectName"),
$"{configuration}_{targetFramework}",
this.TestingPlatform is "MicrosoftTestingPlatform"
? "TestResults"
: "",
"allure-results"
);
item.SetMetadataValueLiteral("ResultsDirectory", defaultResultsDirectory);
Expand Down
2 changes: 2 additions & 0 deletions build/Allure.Build.Tasks/Functions/Files.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public static GeneratedFileSource DirectoryBuildProps(
string solutionDir,
string targetFrameworks,
string outputType,
IEnumerable<(string name, string value)> properties,
IEnumerable<string> imports,
IEnumerable<string> packages,
IEnumerable<string> projects,
Expand All @@ -70,6 +71,7 @@ IEnumerable<string> analyzerProjects
imports: imports,
targetFrameworks: targetFrameworks,
outputType: outputType,
properties: properties,
packages: packages,
projects: projects,
analyzerProjects: analyzerProjects
Expand Down
4 changes: 3 additions & 1 deletion build/Allure.Build.Tasks/Functions/XmlDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public static XDocument DirectoryBuildProps(
IEnumerable<string> imports,
string targetFrameworks,
string outputType,
IEnumerable<(string name, string value)> properties,
IEnumerable<string> packages,
IEnumerable<string> projects,
IEnumerable<string> analyzerProjects
Expand All @@ -120,7 +121,8 @@ IEnumerable<string> analyzerProjects
("OutputType", outputType),
("EnableDefaultItems", "false"),
("IsTestProject", "true"),
("AspectInjector_Enabled", "false")
("AspectInjector_Enabled", "false"),
..properties,
]),
MsBuild.GetItemGroup("Compile", [("Include", Path.Combine("**", "*.cs"))]),
MsBuild.GetItemGroup("Clean", [
Expand Down
8 changes: 8 additions & 0 deletions build/Allure.Build.Tasks/GenerateSampleSolution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public class GenerateSampleSolution : Task
[Required]
public ITaskItem[] SampleProjectReferences { get; set; }

[Required]
public ITaskItem[] SampleProperties { get; set; }

[Required]
public string ProjectDirectory { get; set; }

Expand Down Expand Up @@ -50,6 +53,8 @@ public class GenerateSampleSolution : Task

IEnumerable<ITaskItem2> SampleSources2 => this.SampleSources.Cast<ITaskItem2>();

IEnumerable<ITaskItem2> SampleProperties2 => this.SampleProperties.Cast<ITaskItem2>();

IEnumerable<ITaskItem2> SamplePackageReferences2 =>
this.SamplePackageReferences.Cast<ITaskItem2>();

Expand Down Expand Up @@ -125,6 +130,9 @@ GeneratedFileSource PrepareDirectoryBuildProps(MsBuildImportFiles imports) =>
solutionDir: this.SampleSolutionDir,
targetFrameworks: this.SampleTargetFrameworks,
outputType: Projects.ResolveOutputType(this.TestingPlatform),
properties: this.SampleProperties2.Select(
(item) => (item.EvaluatedIncludeEscaped, item.GetMetadataValueEscaped("Value"))
),
imports.PropsFiles,
packages: this.CommonPackageNames,
projects: this.SampleProjectReferences.Select((item) =>
Expand Down
12 changes: 6 additions & 6 deletions src/Allure.TestingPlatform/Functions/ConfigurationFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public static AllureConfiguration ReadConfiguration<TConfiguration>(
);
}

configPath ??= Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
AllureConstants.CONFIG_FILENAME
);

JObject configJson = File.Exists(configPath)
? JObject.Parse(File.ReadAllText(configPath))
: Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
AllureConstants.CONFIG_FILENAME
) is { } defaultConfigPath && File.Exists(defaultConfigPath)
? JObject.Parse(File.ReadAllText(defaultConfigPath))
: [];
: [];

var allureSection = configJson["allure"] is { } allureObject
? allureObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ static class ModelFunctionExtensions
{
extension (ModelFunctions)
{
public static TestResult CreateTestResult(AllureConfiguration config) =>
new()
public static TestResult CreateTestResult(AllureConfiguration config) => new()
{
uuid = IdFunctions.CreateUUID(),
labels = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Allure.Net.Commons;
using Allure.Net.Commons.Configuration;
using Allure.Net.Commons.Sdk;
using Microsoft.Testing.Platform.Logging;

namespace Allure.TestingPlatform.Registration;

Expand Down
28 changes: 28 additions & 0 deletions src/Allure.Xunit.v3.Generator/Allure.Xunit.v3.Generator.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk" TreatAsLocalProperty="WarnOnPackingNonPackableProject">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Allure.Xunit.Generator</RootNamespace>
<Nullable>enable</Nullable>
<Authors>Qameta Software Inc</Authors>
<Description>
A source generator that automatically enables Allure.Xunit.v3 for a
Microsoft Testing Platform C# project and adds support for Allure test
plan pre-filtering.
</Description>

<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>

<PropertyGroup>
<!-- These properties prevent NuGet from packing the source generator as a separate package.
Instead, it is packed as a part of Allure.Xunit.v3. -->
<IsPackable>false</IsPackable>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" PrivateAssets="all" />
</ItemGroup>

</Project>
Loading
Loading