diff --git a/Documentation/ArcadeSdk.md b/Documentation/ArcadeSdk.md index 5ff86313be4..30f253310fa 100644 --- a/Documentation/ArcadeSdk.md +++ b/Documentation/ArcadeSdk.md @@ -1008,6 +1008,57 @@ Properties that define TargetFramework for use by projects so their targeting ea Set to `true` to indicate that the project is a test utility project. Such are projects that offer utilities to run tests. Example: `Microsoft.DotNet.XUnitExtensions.csproj` in Arcade. This makes are mark them as non-shipping and excluded from source build. +### `OnTestsExecutedProject` (string) + +The path to an MSBuild projects in the consumer repository with `OnTestsExecuted` target, that will be executed whenever project's test have been executed. This can be useful for custom test reporting functionality. + +For example: + +`tests/Directory.Build.props` in the consumer project: +```xml + + + + + $(OnTestsExecutedProperties);TestReporter=true + $(RepositoryEngineeringDir)TestReporter.proj + + +``` + +`eng/TestReporter.proj` in the consumer project: +```xml + + + + + + + + + + + + + + + +``` + +### `OnTestsExecutedProperties` (list of strings) + +List of custom properties to be passed to `OnTestsExecutedProject` whenever project's test have been executed. + ### `SkipTests` (bool) Set to `true` in a test project to skip running tests. diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/VSTest.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/VSTest.targets index fcc64fff4e7..ee45818e72e 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/VSTest.targets +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/VSTest.targets @@ -70,6 +70,16 @@ <_ResultsFileToDisplay Condition="!Exists('$(_ResultsFileToDisplay)')">%(TestToRun.ResultsStdOutPath) + + + + + + +