Skip to content
Closed
6 changes: 6 additions & 0 deletions docs/Changelog-Platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)

## [Unreleased]

### Added

* Add `--test-format` command-line option to customize how test names are displayed in console output. Supported placeholders: `<display>` (display name), `<fqn>` (fully qualified name), `<ns>` (namespace), `<type>` (type name), `<method>` (method name), `<asm>` (assembly name). Default is `<display>`.

## <a name="2.0.2" />[2.0.2] - 2025-11-11

See full log [of v4.0.1...v4.0.2](https://github.com/microsoft/testfx/compare/v4.0.1...v4.0.2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ internal sealed class PlatformCommandLineProvider : ICommandLineOptionsProvider
public const string ConfigFileOptionKey = "config-file";
public const string FilterUidOptionKey = "filter-uid";
public const string DebugAttachOptionKey = "debug";
public const string TestFormatOptionKey = "test-format";

public const string ServerOptionKey = "server";
public const string ClientPortOptionKey = "client-port";
Expand Down Expand Up @@ -61,6 +62,7 @@ internal sealed class PlatformCommandLineProvider : ICommandLineOptionsProvider
new(ConfigFileOptionKey, PlatformResources.PlatformCommandLineConfigFileOptionDescription, ArgumentArity.ExactlyOne, false, isBuiltIn: true),
new(FilterUidOptionKey, PlatformResources.PlatformCommandLineFilterUidOptionDescription, ArgumentArity.OneOrMore, false, isBuiltIn: true),
new(DebugAttachOptionKey, PlatformResources.PlatformCommandLineDebugAttachOptionDescription, ArgumentArity.Zero, false, isBuiltIn: true),
new(TestFormatOptionKey, PlatformResources.PlatformCommandLineTestFormatOptionDescription, ArgumentArity.ExactlyOne, false, isBuiltIn: true),

// Hidden options
new(HelpOptionQuestionMark, PlatformResources.PlatformCommandLineHelpOptionDescription, ArgumentArity.Zero, true, isBuiltIn: true),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.Testing.Platform.Extensions.Messages;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Resources;
using Microsoft.Testing.Platform.Services;
Expand Down Expand Up @@ -857,6 +858,12 @@ internal void TestDiscovered(string displayName)
_terminalWithProgress.UpdateWorker(asm.SlotIndex);
}

internal void TestDiscovered(TestNode testNode)
{
string formattedName = FormatTestName(testNode);
TestDiscovered(formattedName);
}

public void AppendTestDiscoverySummary(ITerminal terminal)
{
TestProgressState? assembly = _testProgressState;
Expand Down Expand Up @@ -941,4 +948,47 @@ public void TestInProgress(

_terminalWithProgress.UpdateWorker(asm.SlotIndex);
}

internal void TestCompleted(
TestNode testNode,
TestOutcome outcome,
TimeSpan? duration,
string? informativeMessage,
string? errorMessage,
Exception? exception,
string? expected,
string? actual,
string? standardOutput,
string? errorOutput)
{
string formattedName = FormatTestName(testNode);
TestCompleted(
testNode.Uid.Value,
formattedName,
outcome,
duration,
informativeMessage,
errorMessage,
exception,
expected,
actual,
standardOutput,
errorOutput);
}

internal void TestInProgress(TestNode testNode)
{
string formattedName = FormatTestName(testNode);
TestInProgress(testNode.Uid.Value, formattedName);
}

private string FormatTestName(TestNode testNode)
{
if (_options.TestNameFormatter is not null)
{
return _options.TestNameFormatter.Format(testNode);
}

return testNode.DisplayName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ internal sealed class TerminalTestReporterOptions
/// Gets a value indicating whether we should force ANSI escape codes. When true the ANSI is used without auto-detecting capabilities of the console. This is needed only for testing.
/// </summary>
internal /* for testing */ bool? ForceAnsi { get; init; }

/// <summary>
/// Gets the test name formatter to use for formatting test names.
/// </summary>
public TestNameFormatter? TestNameFormatter { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Text;

using Microsoft.Testing.Platform.Extensions.Messages;
using Microsoft.Testing.Platform.Helpers;

namespace Microsoft.Testing.Platform.OutputDevice.Terminal;

/// <summary>
/// Formats test names based on a user-provided format string with placeholders.
/// </summary>
internal sealed class TestNameFormatter
{
private readonly string _format;

/// <summary>
/// Initializes a new instance of the <see cref="TestNameFormatter"/> class.
/// </summary>
/// <param name="format">The format string containing placeholders like &lt;fqn&gt;, &lt;display&gt;, etc.</param>
public TestNameFormatter(string format)
{
ArgumentGuard.IsNotNull(format);

Check failure on line 24 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L24

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(24,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 24 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L24

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(24,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 24 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L24

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(24,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 24 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L24

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(24,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 24 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L24

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(24,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'
Comment thread
Evangelink marked this conversation as resolved.
Outdated
_format = format;
}

/// <summary>
/// Formats a test name based on the configured format string.
/// </summary>
/// <param name="testNode">The test node containing the test information.</param>
/// <returns>The formatted test name.</returns>
public string Format(TestNode testNode)
{
ArgumentGuard.IsNotNull(testNode);

Check failure on line 35 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L35

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(35,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 35 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L35

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(35,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 35 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L35

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(35,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 35 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L35

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(35,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 35 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L35

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(35,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'
Comment thread
Evangelink marked this conversation as resolved.
Outdated
ArgumentGuard.IsNotNull(testNode.DisplayName);

Check failure on line 36 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L36

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(36,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 36 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L36

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(36,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 36 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L36

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(36,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'

Check failure on line 36 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L36

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(36,23): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ArgumentGuard' does not contain a definition for 'IsNotNull'
Comment thread
Evangelink marked this conversation as resolved.
Outdated

string result = _format;

// Extract TestMethodIdentifierProperty if available
TestMethodIdentifierProperty? methodIdentifier = testNode.Properties.SingleOrDefault<TestMethodIdentifierProperty>();

// <display> - Display name
result = result.Replace("<display>", testNode.DisplayName, StringComparison.Ordinal);

Check failure on line 44 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L44

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(44,25): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

Check failure on line 44 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L44

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(44,25): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

Check failure on line 44 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L44

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(44,25): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

Check failure on line 44 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L44

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(44,25): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

if (methodIdentifier is not null)
{
// <fqn> - Fully qualified name (namespace.type.method with parameters)
string fqn = BuildFullyQualifiedName(methodIdentifier);
result = result.Replace("<fqn>", fqn, StringComparison.Ordinal);

Check failure on line 50 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L50

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(50,29): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

Check failure on line 50 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L50

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(50,29): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

Check failure on line 50 in src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs#L50

src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs(50,29): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Replace' takes 3 arguments

// <ns> - Namespace
result = result.Replace("<ns>", methodIdentifier.Namespace, StringComparison.Ordinal);

// <type> - Type name
result = result.Replace("<type>", methodIdentifier.TypeName, StringComparison.Ordinal);

// <method> - Method name
result = result.Replace("<method>", methodIdentifier.MethodName, StringComparison.Ordinal);

// <asm> - Assembly name (short name without version/culture/token)
string assemblyName = GetShortAssemblyName(methodIdentifier.AssemblyFullName);
result = result.Replace("<asm>", assemblyName, StringComparison.Ordinal);
}
else
{
// If TestMethodIdentifierProperty is not available, replace with empty or display name
result = result.Replace("<fqn>", testNode.DisplayName, StringComparison.Ordinal);
result = result.Replace("<ns>", string.Empty, StringComparison.Ordinal);
result = result.Replace("<type>", string.Empty, StringComparison.Ordinal);
result = result.Replace("<method>", string.Empty, StringComparison.Ordinal);
result = result.Replace("<asm>", string.Empty, StringComparison.Ordinal);
}

return result;
}

private static string BuildFullyQualifiedName(TestMethodIdentifierProperty methodIdentifier)
{
StringBuilder fqnBuilder = new();

// Add namespace
if (!string.IsNullOrEmpty(methodIdentifier.Namespace))
{
fqnBuilder.Append(methodIdentifier.Namespace);
fqnBuilder.Append('.');
}

// Add type name
fqnBuilder.Append(methodIdentifier.TypeName);
fqnBuilder.Append('.');

// Add method name
fqnBuilder.Append(methodIdentifier.MethodName);

// Add parameters if any
if (methodIdentifier.ParameterTypeFullNames.Length > 0)
{
fqnBuilder.Append('(');
fqnBuilder.Append(string.Join(", ", methodIdentifier.ParameterTypeFullNames));
fqnBuilder.Append(')');
}

return fqnBuilder.ToString();
}

private static string GetShortAssemblyName(string assemblyFullName)
{
// Extract just the assembly name without version, culture, publicKeyToken
int commaIndex = assemblyFullName.IndexOf(',');
return commaIndex > 0 ? assemblyFullName[..commaIndex] : assemblyFullName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ await _policiesService.RegisterOnAbortCallbackAsync(
: !_testHostControllerInfo.IsCurrentProcessTestHostController;

// This is single exe run, don't show all the details of assemblies and their summaries.
TestNameFormatter? testNameFormatter = null;
if (_commandLineOptions.TryGetOptionArgumentList(PlatformCommandLineProvider.TestFormatOptionKey, out string[]? formatArguments) && formatArguments?.Length > 0)
{
testNameFormatter = new TestNameFormatter(formatArguments[0]);
}

_terminalTestReporter = new TerminalTestReporter(_assemblyName, _targetFramework, _shortArchitecture, _console, _testApplicationCancellationTokenSource, new()
{
ShowPassedTests = showPassed,
Expand All @@ -162,6 +168,7 @@ await _policiesService.RegisterOnAbortCallbackAsync(
UseCIAnsi = inCI,
ShowActiveTests = true,
ShowProgress = shouldShowProgress,
TestNameFormatter = testNameFormatter,
});
}

Expand Down Expand Up @@ -410,15 +417,12 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo
switch (testNodeStateChanged.TestNode.Properties.SingleOrDefault<TestNodeStateProperty>())
{
case InProgressTestNodeStateProperty:
_terminalTestReporter.TestInProgress(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName);
_terminalTestReporter.TestInProgress(testNodeStateChanged.TestNode);
break;

case ErrorTestNodeStateProperty errorState:
_terminalTestReporter.TestCompleted(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName,
testNodeStateChanged.TestNode,
TestOutcome.Error,
duration,
null,
Expand All @@ -432,8 +436,7 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo

case FailedTestNodeStateProperty failedState:
_terminalTestReporter.TestCompleted(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName,
testNodeStateChanged.TestNode,
TestOutcome.Fail,
duration,
null,
Expand All @@ -447,8 +450,7 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo

case TimeoutTestNodeStateProperty timeoutState:
_terminalTestReporter.TestCompleted(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName,
testNodeStateChanged.TestNode,
TestOutcome.Timeout,
duration,
null,
Expand All @@ -464,8 +466,7 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo
case CancelledTestNodeStateProperty cancelledState:
#pragma warning restore CS0618 // Type or member is obsolete
_terminalTestReporter.TestCompleted(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName,
testNodeStateChanged.TestNode,
TestOutcome.Canceled,
duration,
null,
Expand All @@ -479,8 +480,7 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo

case PassedTestNodeStateProperty:
_terminalTestReporter.TestCompleted(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName,
testNodeStateChanged.TestNode,
outcome: TestOutcome.Passed,
duration: duration,
informativeMessage: null,
Expand All @@ -494,8 +494,7 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo

case SkippedTestNodeStateProperty skippedState:
_terminalTestReporter.TestCompleted(
testNodeStateChanged.TestNode.Uid.Value,
testNodeStateChanged.TestNode.DisplayName,
testNodeStateChanged.TestNode,
TestOutcome.Skipped,
duration,
informativeMessage: skippedState.Explanation,
Expand All @@ -508,7 +507,7 @@ public Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationTo
break;

case DiscoveredTestNodeStateProperty:
_terminalTestReporter.TestDiscovered(testNodeStateChanged.TestNode.DisplayName);
_terminalTestReporter.TestDiscovered(testNodeStateChanged.TestNode);
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ The available values are 'Trace', 'Debug', 'Information', 'Warning', 'Error', an
<data name="PlatformCommandLineDiscoverTestsOptionDescription" xml:space="preserve">
<value>List available tests.</value>
</data>
<data name="PlatformCommandLineTestFormatOptionDescription" xml:space="preserve">
<value>Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</value>
</data>
<data name="PlatformCommandLineHelpOptionDescription" xml:space="preserve">
<value>Show the command line help.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ Dostupné hodnoty jsou Trace, Debug, Information, Warning, Error a Critical.</ta
<target state="translated">Umožňuje zobrazit seznam dostupných testů.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineTestFormatOptionDescription">
<source>Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</source>
<target state="new">Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineDotnetTestPipe">
<source>dotnet test pipe.</source>
<target state="translated">testovací kanál dotnet.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ Die verfügbaren Werte sind "Trace", "Debug", "Information", "Warning", "Error"
<target state="translated">Listen Sie verfügbare Tests auf.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineTestFormatOptionDescription">
<source>Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</source>
<target state="new">Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineDotnetTestPipe">
<source>dotnet test pipe.</source>
<target state="translated">dotnet-Testpipe.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ Los valores disponibles son 'Seguimiento', 'Depurar', 'Información', 'Advertenc
<target state="translated">Enumere las pruebas disponibles.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineTestFormatOptionDescription">
<source>Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</source>
<target state="new">Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineDotnetTestPipe">
<source>dotnet test pipe.</source>
<target state="translated">canalización de prueba de dotnet.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ Les valeurs disponibles sont « Trace », « Debug », « Information »,
<target state="translated">Répertorier les tests disponibles.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineTestFormatOptionDescription">
<source>Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</source>
<target state="new">Format string for displaying tests. Supported placeholders: &lt;display&gt; (display name), &lt;fqn&gt; (fully qualified name), &lt;ns&gt; (namespace), &lt;type&gt; (type name), &lt;method&gt; (method name), &lt;asm&gt; (assembly name). Default is '&lt;display&gt;'.</target>
<note />
</trans-unit>
<trans-unit id="PlatformCommandLineDotnetTestPipe">
<source>dotnet test pipe.</source>
<target state="translated">canal de test dotnet.</target>
Expand Down
Loading
Loading