diff --git a/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs b/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs index f99ba37b54a..38e26b8f8cd 100644 --- a/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs +++ b/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs @@ -23,6 +23,7 @@ using Microsoft.Testing.Platform.Logging; using Microsoft.Testing.Platform.Messages; using Microsoft.Testing.Platform.OutputDevice; +using Microsoft.Testing.Platform.OutputDevice.Terminal; using Microsoft.Testing.Platform.Requests; using Microsoft.Testing.Platform.ServerMode; using Microsoft.Testing.Platform.Services; @@ -195,6 +196,8 @@ public async Task BuildAsync( // Add the platform output device to the service provider for both modes. serviceProvider.TryAddService(platformOutputDevice); + CommandLine.AddProvider(() => new TerminalTestReporterCommandLineOptionsProvider()); + // Build the command line service - we need special treatment because is possible that an extension query it during the creation. // Add Retry default argument commandlines CommandLineHandler commandLineHandler = await ((CommandLineManager)CommandLine).BuildAsync(platformOutputDevice, loggingState.CommandLineParseResult); diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs index 7e07de97333..180351eaff8 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs @@ -46,6 +46,7 @@ internal async Task BuildAsync(ServiceProvider servicePro loggingState.CommandLineParseResult.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey), PlatformCommandLineProvider.GetMinimumExpectedTests(loggingState.CommandLineParseResult), loggingState.FileLoggerProvider, - serviceProvider.GetClock()); + serviceProvider.GetClock(), + loggingState.CommandLineParseResult); } } diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs new file mode 100644 index 00000000000..42adfdaf94c --- /dev/null +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs @@ -0,0 +1,45 @@ +// 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.CommandLine; +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.CommandLine; +using Microsoft.Testing.Platform.Helpers; +using Microsoft.Testing.Platform.Resources; + +namespace Microsoft.Testing.Platform.OutputDevice.Terminal; + +internal sealed class TerminalTestReporterCommandLineOptionsProvider : ICommandLineOptionsProvider +{ + public const string NoProgressOption = "no-progress"; + public const string NoAnsiOption = "no-ansi"; + + /// + public string Uid { get; } = nameof(TerminalTestReporterCommandLineOptionsProvider); + + /// + public string Version { get; } = AppVersion.DefaultSemVer; + + /// + public string DisplayName { get; } = PlatformResources.TerminalTestReporterDisplayName; + + /// + public string Description { get; } = PlatformResources.TerminalTestReporterDescription; + + /// + public Task IsEnabledAsync() => Task.FromResult(true); + + public IReadOnlyCollection GetCommandLineOptions() + => + [ + new(NoProgressOption, PlatformResources.TerminalNoProgressOptionDescription, ArgumentArity.Zero, false), + new(NoAnsiOption, PlatformResources.TerminalNoAnsiOptionDescription, ArgumentArity.Zero, false) + ]; + + public Task ValidateOptionArgumentsAsync(CommandLineOption commandOption, string[] arguments) + => ValidationResult.ValidTask; + + public Task ValidateCommandLineOptionsAsync(ICommandLineOptions commandLineOptions) + => // No problem found + ValidationResult.ValidTask; +} diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs index 08da0172eb2..4da143f1946 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using System.Text; +using Microsoft.Testing.Platform.CommandLine; using Microsoft.Testing.Platform.Extensions.Messages; using Microsoft.Testing.Platform.Extensions.OutputDevice; using Microsoft.Testing.Platform.Extensions.TestHost; @@ -57,7 +58,7 @@ internal partial class TerminalOutputDevice : IPlatformOutputDevice, public TerminalOutputDevice(ITestApplicationCancellationTokenSource testApplicationCancellationTokenSource, IConsole console, ITestApplicationModuleInfo testApplicationModuleInfo, ITestHostControllerInfo testHostControllerInfo, IAsyncMonitor asyncMonitor, IRuntimeFeature runtimeFeature, IEnvironment environment, IProcessHandler process, IPlatformInformation platformInformation, - bool isVSTestMode, bool isListTests, bool isServerMode, int minimumExpectedTest, FileLoggerProvider? fileLoggerProvider, IClock clock) + bool isVSTestMode, bool isListTests, bool isServerMode, int minimumExpectedTest, FileLoggerProvider? fileLoggerProvider, IClock clock, CommandLineParseResult parseResult) { _testApplicationCancellationTokenSource = testApplicationCancellationTokenSource; _testApplicationModuleInfo = testApplicationModuleInfo; @@ -94,6 +95,21 @@ public TerminalOutputDevice(ITestApplicationCancellationTokenSource testApplicat _bannerDisplayed = true; } + bool noAnsi = parseResult.IsOptionSet(TerminalTestReporterCommandLineOptionsProvider.NoAnsiOption); + bool noProgress = parseResult.IsOptionSet(TerminalTestReporterCommandLineOptionsProvider.NoProgressOption); + + Func shouldShowProgress = noProgress + // User preference is to not show progress. + ? () => false + // User preference is to allow showing progress, figure if we should actually show it based on whether or not we are a testhost controller. + // + // TestHost controller is not running any tests and it should not be writing progress. + // + // The test host controller info is not setup and populated until after this constructor, because it writes banner and then after it figures out if + // the runner is a testHost controller, so we would always have it as null if we capture it directly. Instead we need to check it via + // func. + : () => testHostControllerInfo.IsCurrentProcessTestHostController == null ? null : !testHostControllerInfo.IsCurrentProcessTestHostController; + // This is single exe run, don't show all the details of assemblies and their summaries // and don't show passed tests. bool verbose = false; @@ -104,12 +120,8 @@ public TerminalOutputDevice(ITestApplicationCancellationTokenSource testApplicat ShowAssemblyStartAndComplete = verbose, ShowPassedTests = verbose, MinimumExpectedTests = minimumExpectedTest, - UseAnsi = true, - // TestHost controller is not running any tests and it should not be writing progress. - // The test host controller info is not setup and populated until after this constructor, because it writes banner and then after it figures out if - // the runner is a testHost controller, so we would always have it as null if we capture it directly. Instead we need to check it via - // func. - ShowProgress = () => testHostControllerInfo.IsCurrentProcessTestHostController == null ? null : !testHostControllerInfo.IsCurrentProcessTestHostController, + UseAnsi = !noAnsi, + ShowProgress = shouldShowProgress, }); _testApplicationCancellationTokenSource.CancellationToken.Register(() => _terminalTestReporter.StartCancelling()); diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.Designer.cs b/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.Designer.cs index 85ff6188e23..3f07e56ee67 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.Designer.cs +++ b/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.Designer.cs @@ -1129,6 +1129,42 @@ internal static string TelemetryProviderAlreadySetErrorMessage { } } + /// + /// Looks up a localized string similar to Disable outputting ANSI escape characters to screen.. + /// + internal static string TerminalNoAnsiOptionDescription { + get { + return ResourceManager.GetString("TerminalNoAnsiOptionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disable reporting progress to screen.. + /// + internal static string TerminalNoProgressOptionDescription { + get { + return ResourceManager.GetString("TerminalNoProgressOptionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writes test results to terminal.. + /// + internal static string TerminalTestReporterDescription { + get { + return ResourceManager.GetString("TerminalTestReporterDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Terminal test reporter. + /// + internal static string TerminalTestReporterDisplayName { + get { + return ResourceManager.GetString("TerminalTestReporterDisplayName", resourceCulture); + } + } + /// /// Looks up a localized string similar to An 'ITestFrameworkInvoker' factory is already set. /// diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx b/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx index 96116afc456..1960adbe67a 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx +++ b/src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx @@ -584,4 +584,16 @@ Read more about Microsoft Testing Platform telemetry: https://aka.ms/testingplat in in that is used in stack frame it is followed by file name + + Disable outputting ANSI escape characters to screen. + + + Disable reporting progress to screen. + + + Writes test results to terminal. + + + Terminal test reporter + \ No newline at end of file diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf index 61b9014c47a..31972deba2a 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf @@ -613,6 +613,26 @@ Přečtěte si další informace o telemetrii Microsoft Testing Platform: https: Zprostředkovatel telemetrie je už nastavený. + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Objekt pro vytváření ITestFrameworkInvoker je už nastavený. diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf index eded002209f..746892ab1bc 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf @@ -613,6 +613,26 @@ Weitere Informationen zu Microsoft Testing Platform-Telemetriedaten: https://aka Der Telemetrieanbieter ist bereits festgelegt + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Eine "ITestFrameworkInvoker"-Factory ist bereits festgelegt diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf index 854121a66a0..fcd6304e6d3 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf @@ -613,6 +613,26 @@ Más información sobre la telemetría de la Plataforma de pruebas de Microsoft: El proveedor de telemetría ya está establecido + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Ya se ha establecido una fábrica "ITestFrameworkInvoker" diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf index f4cb3cb85e1..0f3979678c9 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf @@ -613,6 +613,26 @@ En savoir plus sur la télémétrie de la plateforme de tests Microsoft : https: Le fournisseur de télémétrie est déjà défini + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Désolé, une fabrique « ITestFrameworkInvoker » est déjà définie diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf index 2ee935d9ecb..8d34b18de8a 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf @@ -613,6 +613,26 @@ Altre informazioni sulla telemetria della piattaforma di test Microsoft: https:/ Il provider di telemetria è già impostato + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Una factory 'ITestFrameworkInvoker' è già impostata diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf index 671eae8453b..c14d0e825e7 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf @@ -614,6 +614,26 @@ Microsoft Testing Platform テレメトリの詳細: https://aka.ms/testingplatf テレメトリ プロバイダーは既に設定されています + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set 'ITestFrameworkInvoker' ファクトリは既に設定されています diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf index f30012d2f8a..829f858c2ec 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf @@ -613,6 +613,26 @@ Microsoft 테스트 플랫폼 원격 분석에 대해 자세히 알아보기: ht 원격 분석 공급자가 이미 설정되어 있습니다. + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set 'ITestFrameworkInvoker' 팩터리가 이미 설정됨 diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf index 8657e323881..004941b5930 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf @@ -613,6 +613,26 @@ Więcej informacji o telemetrii platformy testowej firmy Microsoft: https://aka. Dostawca telemetrii jest już ustawiony + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Fabryka „ITestFrameworkInvoker” jest już ustawiona diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf index e7247ec74c5..26c49faf034 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf @@ -613,6 +613,26 @@ Leia mais sobre a telemetria da Plataforma de Testes da Microsoft: https://aka.m O provedor de telemetria já está definido + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Uma fábrica “ITestFrameworkInvoker” já está definida diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf index 8dd8915ba97..b903967545b 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf @@ -613,6 +613,26 @@ Read more about Microsoft Testing Platform telemetry: https://aka.ms/testingplat Поставщик телеметрии уже настроен + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Фабрика ITestFrameworkInvoker уже настроена diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf index 23e7f1b229f..b18d4842ee8 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf @@ -613,6 +613,26 @@ Microsoft Test Platformu telemetrisi hakkında daha fazla bilgi edinin: https:// Telemetri sağlayıcısı zaten ayarlanmış + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set Bir 'ITestFrameworkInvoker' fabrikası zaten ayarlanmış diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf index 9475bc87615..3f677b9acd8 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf @@ -613,6 +613,26 @@ Microsoft 测试平台会收集使用数据,帮助我们改善体验。该数 已设置遥测提供程序 + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set 已设置“ITestFrameworkInvoker”工厂 diff --git a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf index 068e75deb59..458e1e39645 100644 --- a/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf +++ b/src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf @@ -613,6 +613,26 @@ Microsoft 測試平台會收集使用量資料,以協助我們改善您的體 遙測提供者已設定 + + Disable outputting ANSI escape characters to screen. + Disable outputting ANSI escape characters to screen. + + + + Disable reporting progress to screen. + Disable reporting progress to screen. + + + + Writes test results to terminal. + Writes test results to terminal. + + + + Terminal test reporter + Terminal test reporter + + An 'ITestFrameworkInvoker' factory is already set 已設定 'ITestFrameworkInvoker' 中心 diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs index 686aaf9b4e2..0b319b159e7 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs @@ -45,6 +45,8 @@ Execute a .NET Test Application. --results-directory The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the test application. Extension options: --filter Filters tests using the given expression. For more information, see the Filter option details section. For more information and examples on how to use selective unit test filtering, see https://learn.microsoft.com/dotnet/core/testing/selective-unit-tests. + --no-ansi Disable outputting ANSI escape characters to screen. + --no-progress Disable reporting progress to screen. --settings The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file --test-parameter Specify or override a key-value pair parameter. For more information and examples, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#testrunparameters """; @@ -78,8 +80,6 @@ public async Task Info_WhenMSTestExtensionRegistered_OutputInfoContentOfRegister Arity: 1..N Hidden: False Description: Specify or override a key-value pair parameter. For more information and examples, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#testrunparameters -Registered tools: - There are no registered tools. """; testHostResult.AssertOutputContains(output); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs index 7c2b64f9f66..d0465fa06e8 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs @@ -40,6 +40,8 @@ Execute a .NET Test Application. --minimum-expected-tests Specifies the minimum number of tests that are expected to run. --results-directory The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the test application. Extension options: + --no-ansi Disable outputting ANSI escape characters to screen. + --no-progress Disable reporting progress to screen. --treenode-filter Use a tree filter to filter down the tests to execute """; @@ -72,6 +74,8 @@ Execute a .NET Test Application. --minimum-expected-tests Specifies the minimum number of tests that are expected to run. --results-directory The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the test application. Extension options: + --no-ansi Disable outputting ANSI escape characters to screen. + --no-progress Disable reporting progress to screen. --treenode-filter Use a tree filter to filter down the tests to execute """; @@ -107,6 +111,8 @@ Execute a .NET Test Application. --minimum-expected-tests Specifies the minimum number of tests that are expected to run. --results-directory The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the test application. Extension options: + --no-ansi Disable outputting ANSI escape characters to screen. + --no-progress Disable reporting progress to screen. --treenode-filter Use a tree filter to filter down the tests to execute """; @@ -223,6 +229,19 @@ .NET Testing Platform v.+ \[.+\] Hidden: True Description: Enable the server mode\. Registered command line providers: + TerminalTestReporterCommandLineOptionsProvider + Name: Terminal test reporter + Version: .+ + Description: Writes test results to terminal. + Options: + --no-ansi + Arity: 0 + Hidden: False + Description: Disable outputting ANSI escape characters to screen. + --no-progress + Arity: 0 + Hidden: False + Description: Disable reporting progress to screen. TestingFrameworkExtension Name: Microsoft Testing Framework Version: .+ @@ -275,6 +294,8 @@ Execute a .NET Test Application. --hangdump-filename Specify the name of the dump file --hangdump-timeout Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m. --hangdump-type Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full' + --no-ansi Disable outputting ANSI escape characters to screen. + --no-progress Disable reporting progress to screen. --report-trx Enable generating TRX report --report-trx-filename The name of the generated TRX report --treenode-filter Use a tree filter to filter down the tests to execute @@ -319,6 +340,8 @@ Execute a .NET Test Application. --hangdump-filename Specify the name of the dump file --hangdump-timeout Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m. --hangdump-type Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full' + --no-ansi Disable outputting ANSI escape characters to screen. + --no-progress Disable reporting progress to screen. --report-trx Enable generating TRX report --report-trx-filename The name of the generated TRX report --treenode-filter Use a tree filter to filter down the tests to execute @@ -496,6 +519,19 @@ .NET Testing Platform v* [*] Arity: 1 Hidden: False Description: Disable retry mechanism if the number of failed tests is greater than the specified value + TerminalTestReporterCommandLineOptionsProvider + Name: Terminal test reporter + Version: * + Description: Writes test results to terminal. + Options: + --no-ansi + Arity: 0 + Hidden: False + Description: Disable outputting ANSI escape characters to screen. + --no-progress + Arity: 0 + Hidden: False + Description: Disable reporting progress to screen. TestingFrameworkExtension Name: Microsoft Testing Framework Version: *