diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineOptions.cs b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineOptions.cs index 6adbcab906..8151d5a290 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineOptions.cs +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineOptions.cs @@ -6,8 +6,10 @@ namespace Microsoft.Testing.Extensions.Reporting; internal static class AzureDevOpsCommandLineOptions { public const string AzureDevOpsOptionName = "report-azdo"; + public const string AzureDevOpsAnnotations = "report-azdo-annotations"; public const string AzureDevOpsDemoteKnownFlaky = "report-azdo-demote-known-flaky"; public const string AzureDevOpsFlakyHistory = "report-azdo-flaky-history"; + public const string AzureDevOpsGroups = "report-azdo-groups"; public const string AzureDevOpsQuarantineFile = "report-azdo-quarantine-file"; public const string AzureDevOpsReportSeverity = "report-azdo-severity"; public const string AzureDevOpsSlowTestHistory = "report-azdo-slow-test-history"; @@ -26,6 +28,9 @@ internal static class AzureDevOpsCommandLineOptions public const string PublishAzureDevOpsRunNameOptionName = "publish-azdo-run-name"; public const string PublishAzureDevOpsTestResultsOptionName = "publish-azdo-test-results"; + public const string OptionOn = "on"; + public const string OptionOff = "off"; + public const int SlowTestHistoryDefaultMinSample = 10; public const double SlowTestHistoryDefaultMultiplier = 3.0; public const int SlowTestStaticThresholdSeconds = 60; diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineProvider.cs b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineProvider.cs index 81cd8a5d1a..1eb67d357a 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineProvider.cs +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineProvider.cs @@ -23,6 +23,12 @@ internal sealed class AzureDevOpsCommandLineProvider : CommandLineOptionsProvide private static readonly string[] SeverityOptions = ["error", "warning"]; + private static readonly string[] OnOffOptions = + [ + AzureDevOpsCommandLineOptions.OptionOn, + AzureDevOpsCommandLineOptions.OptionOff, + ]; + internal const int MaxStackFrameFilterPatterns = 16; internal const int StackFrameFilterMatchTimeoutMs = 500; @@ -55,8 +61,10 @@ public AzureDevOpsCommandLineProvider() AzureDevOpsResources.Description, [ new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsOptionName, AzureDevOpsResources.OptionDescription, ArgumentArity.Zero, false), + new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations, AzureDevOpsResources.AnnotationsOptionDescription, ArgumentArity.ExactlyOne, false), new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsDemoteKnownFlaky, DemoteKnownFlakyOptionDescriptionFormatted, ArgumentArity.Zero, false), new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsFlakyHistory, AzureDevOpsResources.FlakyHistoryOptionDescription, ArgumentArity.ExactlyOne, false), + new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsGroups, AzureDevOpsResources.GroupsOptionDescription, ArgumentArity.ExactlyOne, false), new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsQuarantineFile, AzureDevOpsResources.QuarantineFileOptionDescription, ArgumentArity.ExactlyOne, false), new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsReportSeverity, AzureDevOpsResources.SeverityOptionDescription, ArgumentArity.ExactlyOne, false), new CommandLineOption(AzureDevOpsCommandLineOptions.AzureDevOpsSlowTestHistory, AzureDevOpsResources.SlowTestHistoryOptionDescription, ArgumentArity.ExactlyOne, false), @@ -77,6 +85,9 @@ public AzureDevOpsCommandLineProvider() public override Task ValidateOptionArgumentsAsync(CommandLineOption commandOption, string[] arguments) => commandOption.Name switch { + AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations or AzureDevOpsCommandLineOptions.AzureDevOpsGroups + when !OnOffOptions.Contains(arguments[0], StringComparer.OrdinalIgnoreCase) + => ValidationResult.InvalidTask(string.Format(CultureInfo.InvariantCulture, AzureDevOpsResources.InvalidOnOffValue, arguments[0])), AzureDevOpsCommandLineOptions.AzureDevOpsFlakyHistory => ValidateFlakyHistoryArgumentsAsync(arguments), AzureDevOpsCommandLineOptions.AzureDevOpsSlowTestHistory => ValidateSlowTestHistoryArgumentsAsync(arguments), AzureDevOpsCommandLineOptions.AzureDevOpsSlowTestHistoryMinSample => ValidateSlowTestHistoryMinSampleArgumentsAsync(arguments), @@ -96,7 +107,15 @@ public override Task ValidateCommandLineOptionsAsync(ICommandL string? errorMessage = null; if (!commandLineOptions.IsOptionSet(AzureDevOpsCommandLineOptions.AzureDevOpsOptionName)) { - if (commandLineOptions.IsOptionSet(AzureDevOpsCommandLineOptions.AzureDevOpsDemoteKnownFlaky)) + if (commandLineOptions.IsOptionSet(AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations)) + { + errorMessage = AzureDevOpsResources.AzureDevOpsAnnotationsRequiresAzureDevOps; + } + else if (commandLineOptions.IsOptionSet(AzureDevOpsCommandLineOptions.AzureDevOpsGroups)) + { + errorMessage = AzureDevOpsResources.AzureDevOpsGroupsRequiresAzureDevOps; + } + else if (commandLineOptions.IsOptionSet(AzureDevOpsCommandLineOptions.AzureDevOpsDemoteKnownFlaky)) { errorMessage = AzureDevOpsResources.AzureDevOpsDemoteKnownFlakyRequiresAzureDevOps; } diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsConstants.cs b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsConstants.cs index 7021220a45..09d051034a 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsConstants.cs +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsConstants.cs @@ -1,6 +1,8 @@ // 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.Extensions.Reporting; +using Microsoft.Testing.Platform.CommandLine; using Microsoft.Testing.Platform.Helpers; namespace Microsoft.Testing.Extensions.AzureDevOpsReport; @@ -34,4 +36,14 @@ public static bool IsRunningInAzureDevOps(IEnvironment environment) environment.GetEnvironmentVariable(TfBuildEnvironmentVariableName), TfBuildEnabledValue, StringComparison.OrdinalIgnoreCase); + + /// + /// Returns whether an individual on|off feature knob is enabled. A knob is enabled unless it + /// is explicitly set to off (case-insensitive), so every feature defaults to on once + /// the extension itself is active. + /// + public static bool IsFeatureKnobEnabled(ICommandLineOptions commandLineOptions, string knobOptionName) + => !(commandLineOptions.TryGetOptionArgumentList(knobOptionName, out string[]? arguments) + && arguments is [string value] + && string.Equals(value, AzureDevOpsCommandLineOptions.OptionOff, StringComparison.OrdinalIgnoreCase)); } diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsLogGroupReporter.cs b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsLogGroupReporter.cs index 711ba1cd3e..4ce3ff7d02 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsLogGroupReporter.cs +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsLogGroupReporter.cs @@ -69,7 +69,8 @@ public AzureDevOpsLogGroupReporter( public Task IsEnabledAsync() => Task.FromResult( _commandLineOptions.IsOptionSet(AzureDevOpsCommandLineOptions.AzureDevOpsOptionName) - && AzureDevOpsConstants.IsRunningInAzureDevOps(_environment)); + && AzureDevOpsConstants.IsRunningInAzureDevOps(_environment) + && AzureDevOpsConstants.IsFeatureKnobEnabled(_commandLineOptions, AzureDevOpsCommandLineOptions.AzureDevOpsGroups)); // No-op: this consumer subscribes to data only to be ordered in the consumer phase at session // end (see the type-level remarks). It does not act on individual messages. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReporter.cs b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReporter.cs index b8595b44f9..c6a790b653 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReporter.cs +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReporter.cs @@ -109,13 +109,16 @@ public Task IsEnabledAsync() EnsureEnabledConfigurationLoaded(); } + bool annotationsEnabled = AzureDevOpsConstants.IsFeatureKnobEnabled(_commandLine, AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations); + if (_logger.IsEnabled(LogLevel.Trace)) { _logger.LogTrace($"{AzureDevOpsConstants.TfBuildEnvironmentVariableName} environment variable is {(isEnabledByEnvVariable ? "enabled. Will report errors to Azure DevOps, because we are running in CI." : "disabled. Will not report errors to Azure DevOps.")}"); _logger.LogTrace($"Severity is set to '{_severity ?? "error"}', you can override it by using --report-azdo-severity parameter."); + _logger.LogTrace($"Failure annotations are {(annotationsEnabled ? "enabled" : "disabled")}, you can toggle them by using --report-azdo-annotations parameter."); } - return Task.FromResult(isEnabledByEnvVariable); + return Task.FromResult(isEnabledByEnvVariable && annotationsEnabled); } public async Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationToken cancellationToken) diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx index 838520836c..ebbb0a3e02 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx @@ -117,6 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. {Locked="--report-azdo-upload-artifact-include"}{Locked="--report-azdo-upload-artifact-exclude"}{Locked="--report-azdo-upload-artifact-name"}{Locked="--report-azdo-upload-artifacts"}{Locked="off"} @@ -125,6 +129,10 @@ Azure DevOps artifact upload was requested, but TF_BUILD is not set to 'true'; skipping Azure DevOps artifact upload and build tags. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled {Locked="--report-azdo-demote-known-flaky"}{Locked="--report-azdo"} @@ -137,6 +145,10 @@ '--report-azdo-flaky-history' requires '--report-azdo' to be enabled {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. @@ -250,6 +262,10 @@ Azure DevOps flaky history for run '{0}' exceeded {1} pages or returned an unchanged continuation token. Remaining results will be ignored. {0} is the Azure DevOps run URL. {1} is the maximum number of pages. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. {0} is the invalid glob pattern. @@ -262,6 +278,10 @@ Invalid value '{0}' for '--report-azdo-flaky-history'. Provide an integer between 1 and 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. {0} is the invalid option value. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.cs.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.cs.xlf index eeb73e8709..79a7f9b8cd 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.cs.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.cs.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. Parametry --report-azdo-upload-artifact-include, --report-azdo-upload-artifact-exclude a --report-azdo-upload-artifact-name vyžadují, aby parametr --report-azdo-upload-artifacts byl nastavený na jinou hodnotu než off. @@ -12,6 +17,11 @@ Bylo vyžádáno nahrání artefaktu Azure DevOps, ale TF_BUILD není nastavené na hodnotu true. Nahrání artefaktu Azure DevOps a značek buildu se přeskočí. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled Aby bylo možné použít parametr --report-azdo-demote-known-flaky, musí být povolený parametr --report-azdo. @@ -27,6 +37,11 @@ Aby bylo možné použít parametr ---report-azdo-flaky-history, musí být povolený parametr --report-azdo. {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Živému publikování Azure DevOps se nepodařilo dokončit testovací běh. @@ -197,6 +212,11 @@ Historie nestability Azure DevOps vrátila {0} spuštění. Prověří se jenom první(ch) {1} spuštění. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Neplatný vzor glob {0} @@ -212,6 +232,11 @@ Neplatná hodnota {0} pro --report-azdo-flaky-history Zadejte celé číslo mezi 1 a 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Neplatná možnost {0}. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.de.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.de.xlf index aea5131a37..424b7fab2d 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.de.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.de.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. „--report-azdo-upload-artifact-include“, „--report-azdo-upload-artifact-exclude“, und „--report-azdo-upload-artifact-name“ erfordern, dass „--report-azdo-upload-artifacts“ auf einen anderen Wert als „off“ festgelegt werden. @@ -12,6 +17,11 @@ Azure DevOps-Artefaktupload wurde angefordert, aber TF_BUILD ist nicht auf „true“ festgelegt. Azure DevOps Artefaktupload und Buildtags werden übersprungen. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled Für „--report-azdo-demote-known-flaky“ muss „--report-azdo“ aktiviert sein. @@ -27,6 +37,11 @@ Für „--report-azdo-flaky-history“ muss „--report-azdo“ aktiviert sein. {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Die Azure DevOps Liveveröffentlichung konnte den Testlauf nicht abschließen. @@ -197,6 +212,11 @@ Der unzuverlässige Azure DevOps-Verlauf hat {0} Ausführungen zurückgegeben. Nur die ersten {1} Ausführungen werden überprüft. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Ungültiges Globmuster „{0}“. @@ -212,6 +232,11 @@ Ungültiger Wert „{0}“ für „--report-azdo-flaky-history“. Geben Sie eine ganze Zahl zwischen 1 und 90 an. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Ungültige Option „{0}“. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.es.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.es.xlf index dd60ea61f4..90717b9f40 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.es.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.es.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. "--report-azdo-upload-artifact-include", "--report-azdo-upload-artifact-exclude" y "--report-azdo-upload-artifact-name" requieren que "--report-azdo-upload-artifacts" esté establecido en un valor distinto de "off". @@ -12,6 +17,11 @@ Se solicitó la carga de artefactos de Azure DevOps, pero TF_BUILD no está establecido en "true"; se omite la carga de artefactos y las etiquetas de compilación de Azure DevOps. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled "--report-azdo-demote-known-flaky" requiere que se habilite "--report-azdo" @@ -27,6 +37,11 @@ "--report-azdo-flaky-history" requiere que se habilite "--report-azdo" {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. La publicación en directo de Azure DevOps no pudo completar la ejecución de pruebas. @@ -197,6 +212,11 @@ Azure DevOps devolvió {0} ejecuciones del historial de inestabilidad. Solo se inspeccionarán las primeras {1} ejecuciones. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Patrón global no válido {0}. @@ -212,6 +232,11 @@ Valor no válido "{0}" para "--report-azdo-flaky-history". Proporcione un entero entre 1 y 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Opción no válida {0}. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.fr.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.fr.xlf index 851e7fd206..0c6d0fc865 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.fr.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.fr.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. « --report-azdo-upload-artifact-include », « --report-azdo-upload-artifact-exclude » et « --report-azdo-upload-artifact-name » nécessitent que « --report-azdo-upload-artifacts » soit défini sur une valeur autre que « off ». @@ -12,6 +17,11 @@ Le chargement d’artefacts Azure DevOps a été demandé, mais TF_BUILD n’est pas défini sur « true ». Le chargement d’artefacts Azure DevOps et l’ajout de balises de build sont ignorés. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled « --report-azdo-demote-known-flaky » nécessite que « --report-azdo » soit activé @@ -27,6 +37,11 @@ « --report-azdo-flaky-history » nécessite l’activation de « --report-azdo » {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Nous n’avons pas pu effectuer la publication en direct d’Azure DevOps pour effectuer l’exécution de tests. @@ -197,6 +212,11 @@ L’historique des échecs intermittents Azure DevOps a renvoyé {0} exécutions. Seules les {1} premières exécutions seront examinées. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Modèle Glob {0} non valide. @@ -212,6 +232,11 @@ Valeur non valide « {0} » pour « --report-azdo-flaky-history ». Indiquez un nombre entier entre 1 et 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Option {0} non valide. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.it.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.it.xlf index a1b683d495..23f34e2048 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.it.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.it.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude' e '--report-azdo-upload-artifact-name' richiedono che '--report-azdo-upload-artifacts' sia impostato su un valore diverso da 'off'. @@ -12,6 +17,11 @@ È stato richiesto il caricamento degli artefatti di Azure DevOps, ma TF_BUILD non è impostato su "true"; il caricamento degli artefatti e i tag di build di Azure DevOps verranno ignorati. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled '--report-azdo-demote-known-flaky' richiede che '--report-azdo' sia abilitato @@ -27,6 +37,11 @@ '--report-azdo-flaky-history' richiede l'autenticazione di '--report-azdo' {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. La pubblicazione live di Azure DevOps non è riuscita a completare l'esecuzione dei test. @@ -197,6 +212,11 @@ La cronologia degli elementi instabili di Azure DevOps ha restituito {0} esecuzioni. Verranno esaminate solo le prime {1} esecuzioni. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Il modello GLOB {0} non è valido. @@ -212,6 +232,11 @@ Valore non valido '{0}' per '--report-azdo-flaky-history'. Specifica un numero intero compreso tra 1 e 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Opzione non valida {0}. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ja.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ja.xlf index 84d1e76f19..fbf69b3b4a 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ja.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ja.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. '--report-azdo-upload-artifact-include'、'--report-azdo-upload-artifact-exclude'、および '--report-azdo-upload-artifact-name' では、'--report-azdo-upload-artifacts' を 'off' 以外の値に設定する必要があります。 @@ -12,6 +17,11 @@ Azure DevOps の成果物のアップロードが要求されましたが、TF_BUILD が 'true' に設定されていないため、Azure DevOps の成果物のアップロードとビルド タグをスキップします。 {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled '--report-azdo-demote-known-flaky' には、'--report-azdo' を有効にする必要があります @@ -27,6 +37,11 @@ '--report-azdo-flaky-history' では '--report-azdo' を有効にする必要があります {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Azure DevOps ライブ公開でテスト実行を完了できませんでした。 @@ -197,6 +212,11 @@ Azure DevOps の flaky 履歴が {0} 件の実行を返しました。最初の {1} 件の実行のみが検査されます。 {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. glob パターン {0} が無効です。 @@ -212,6 +232,11 @@ '--report-azdo-flaky-history' の値 '{0}' が無効です。1 から 90 までの整数を入力してください。 {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. オプション {0} が無効です。 diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ko.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ko.xlf index cbe52507f3..19e7604648 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ko.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ko.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', '--report-azdo-upload-artifact-name'을 사용하려면 '--report-azdo-upload-artifacts'를 'off' 이외의 값으로 설정해야 합니다. @@ -12,6 +17,11 @@ Azure DevOps 아티팩트 업로드가 요청되었지만 TF_BUILD가 'true'로 설정되지 않았습니다. Azure DevOps 아티팩트 업로드와 빌드 태그를 건너뜁니다. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled '--report-azdo-demote-known-flaky'를 사용하려면 '--report-azdo'가 활성화되어 있어야 합니다. @@ -27,6 +37,11 @@ '--report-azdo-flaky-history'를 사용하려면 '--report-azdo'가 활성화되어 있어야 합니다. {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Azure DevOps 라이브 게시에서 테스트 실행을 완료하지 못했습니다. @@ -197,6 +212,11 @@ Azure DevOps 불안정성 기록이 {0}회 반환되었습니다. 첫 {1}회 실행만 검사합니다. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. GLOB 패턴 {0}이(가) 잘못되었습니다. @@ -212,6 +232,11 @@ '--report-azdo-flaky-history'의 값 '{0}'이(가) 잘못되었습니다. 1에서 90 사이의 정수를 입력하세요. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. {0} 옵션이 잘못되었습니다. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pl.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pl.xlf index 3479b99b5f..26150622cd 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pl.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pl.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. „--report-azdo-upload-artifact-include”, „--report-azdo-upload-artifact-exclude” i „--report-azdo-upload-artifact-name” wymagają ustawienia wartości „--report-azdo-upload-artifacts” na wartość inną niż „off”. @@ -12,6 +17,11 @@ Zażądano przekazania artefaktu usługi Azure DevOps, ale TF_BUILD nie jest ustawiona na wartość „true”; pomijanie przekazywania artefaktu usługi Azure DevOps i tagów kompilacji. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled Element „--report-azdo-demote-known-flaky” wymaga włączenia opcji „--report-azdo” @@ -27,6 +37,11 @@ Element „--report-azdo-flaky-history” wymaga włączenia opcji „--report-azdo” {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Publikowanie na żywo w usłudze Azure DevOps nie może ukończyć przebiegu testu. @@ -197,6 +212,11 @@ Niestabilna historia usługi Azure DevOps zwróciła następującą liczbę przebiegów: {0}. Tylko pierwsze przebiegi ({1}) zostaną poddane inspekcji. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Nieprawidłowy wzorzec globalny „{0}”. @@ -212,6 +232,11 @@ Nieprawidłowa wartość „{0}” dla „--report-azdo-flaky-history”. Podaj liczbę całkowitą z zakresu od 1 do 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Nieprawidłowa opcja {0}. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pt-BR.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pt-BR.xlf index 7ec20c1ac0..c41c1be1d0 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pt-BR.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.pt-BR.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', e '--report-azdo-upload-artifact-name' requerem que '--report-azdo-upload-artifacts' esteja definido com um valor diferente de 'off'. @@ -12,6 +17,11 @@ A solicitação de upload de artefatos do Azure DevOps foi feita, mas TF_BUILD não está definido como 'true'; ignorando o upload de artefatos e as marcas de compilação do Azure DevOps. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled '--report-azdo-demote-known-flaky' requer que '--report-azdo' esteja habilitado @@ -27,6 +37,11 @@ '--report-azdo-flaky-history' requer que '--report-azdo' esteja habilitado {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. A publicação ao vivo do Azure DevOps falhou ao concluir a execução de teste. @@ -197,6 +212,11 @@ O histórico de instabilidade recorrente do Azure DevOps retornou {0} execuções. Somente as primeiras {1} execuções serão inspecionadas. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Padrão glob inválido {0}. @@ -212,6 +232,11 @@ Valor inválido '{0}' para '--report-azdo-flaky-history'. Forneça um inteiro entre 1 e 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Opção {0} inválida. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ru.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ru.xlf index dc0d36d799..7843dd5441 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ru.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.ru.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. "--report-azdo-upload-artifact-include", "--report-azdo-upload-artifact-exclude" и "--report-azdo-upload-artifact-name" требуют, чтобы для "--report-azdo-upload-artifacts" было настроено значение, отличное от "off". @@ -12,6 +17,11 @@ Запрошена отправка артефактов Azure DevOps, но для TF_BUILD не настроено значение "true"; отправка артефактов Azure DevOps и теги сборки пропускаются. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled "--report-azdo-demote-known-flaky" требует включения "--report-azdo" @@ -27,6 +37,11 @@ "--report-azdo-flaky-history" требует включения "--report-azdo" {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Azure DevOps: не удалось выполнить тестовый запуск при публикации в реальном времени. @@ -197,6 +212,11 @@ Журнал ненадежных экземпляров Azure DevOps вернул несколько ({0}) выполнений. Будут проверены только первые несколько ({1}) выполнений. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. Недопустимая стандартная маска {0}. @@ -212,6 +232,11 @@ Недопустимое значение "{0}" для "--report-azdo-flaky-history". Укажите целое число в диапазоне от 1 до 90. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Недопустимый параметр {0}. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.tr.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.tr.xlf index 974a9d729f..76d1834c9f 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.tr.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.tr.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude' ve '--report-azdo-upload-artifact-name', '--report-azdo-upload-artifacts' seçeneğinin 'off' dışındaki bir değere ayarlanmasını gerektirir. @@ -12,6 +17,11 @@ Azure DevOps yapıtı karşıya yükleme istendi, ancak TF_BUILD 'true' olarak ayarlanmadı; Azure DevOps yapıtı karşıya yükleme ve derleme etiketleri atlanıyor. {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled '--report-azdo-demote-known-flaky' öğesi '--report-azdo' öğesinin etkinleştirilmesini gerektirir @@ -27,6 +37,11 @@ '--report-azdo-flaky-history' öğesi '--report-azdo' öğesinin etkinleştirilmesini gerektirir {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Azure DevOps canlı yayımlama test çalıştırmasını tamamlayamadı. @@ -197,6 +212,11 @@ Azure DevOps güvenilir olmayan geçmişi {0} çalıştırma döndürdü. Yalnızca ilk {1} çalıştırma incelenecek. {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. {0} glob deseni geçersiz. @@ -212,6 +232,11 @@ '--report-azdo-flaky-history' için geçersiz değer '{0}'. 1 ile 90 arasında bir tamsayı belirtin. {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. Geçersiz seçenek{0}. diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hans.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hans.xlf index 2ba1f2c8eb..b7e968c2cf 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hans.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hans.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. "--report-azdo-upload-artifact-include"、"--report-azdo-upload-artifact-exclude" 和 "--report-azdo-upload-artifact-name" 要求 "--report-azdo-upload-artifacts" 设置为非 "off" 的值。 @@ -12,6 +17,11 @@ 已请求上传 Azure DevOps 项目,但 TF_BUILD 未设置为 "true";正在跳过 Azure DevOps 项目上传和生成标记。 {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled "--report-azdo-demote-known-flaky" 要求启用 "--report-azdo" @@ -27,6 +37,11 @@ "--report-azdo-flaky-history" 要求启用 "--report-azdo" {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Azure DevOps 实时发布未能完成测试运行。 @@ -197,6 +212,11 @@ Azure DevOps 不可靠历史记录返回 {0} 次运行。仅检查前 {1} 次运行。 {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. glob 模式 {0} 无效。 @@ -212,6 +232,11 @@ "--report-azdo-flaky-history" 的值“{0}”无效。请提供 1 到 90 之间的整数。 {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. 选项 {0} 无效。 diff --git a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hant.xlf b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hant.xlf index 4f8f824204..5157b30070 100644 --- a/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hant.xlf +++ b/src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.zh-Hant.xlf @@ -2,6 +2,11 @@ + + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + '--report-azdo-upload-artifact-include', '--report-azdo-upload-artifact-exclude', and '--report-azdo-upload-artifact-name' require '--report-azdo-upload-artifacts' to be set to a value other than 'off'. '--report-azdo-upload-artifact-include'、'--report-azdo-upload-artifact-exclude' 和 '--report-azdo-upload-artifact-name' 需要將 '--report-azdo-upload-artifacts' 設定為 'off' 以外的值。 @@ -12,6 +17,11 @@ 已要求 Azure DevOps 成品上傳,但 TF_BUILD 未設定為 'true';將略過 Azure DevOps 成品上傳和組建標籤。 {Locked="TF_BUILD"}{Locked="true"} + + '--report-azdo-annotations' requires '--report-azdo' to be enabled + '--report-azdo-annotations' requires '--report-azdo' to be enabled + {Locked="--report-azdo-annotations"}{Locked="--report-azdo"} + '--report-azdo-demote-known-flaky' requires '--report-azdo' to be enabled '--report-azdo-demote-known-flaky' 需要啟用 '--report-azdo' @@ -27,6 +37,11 @@ '--report-azdo-flaky-history' 需要啟用 '--report-azdo' {Locked="--report-azdo-flaky-history"}{Locked="--report-azdo"} + + '--report-azdo-groups' requires '--report-azdo' to be enabled + '--report-azdo-groups' requires '--report-azdo' to be enabled + {Locked="--report-azdo-groups"}{Locked="--report-azdo"} + Azure DevOps live publishing failed to complete the test run. Azure DevOps 即時發佈無法完成測試執行。 @@ -197,6 +212,11 @@ Azure DevOps 不穩定歷程記錄傳回 {0} 次執行。只會檢查前 {1} 次執行。 {0} is the number of runs returned. {1} is the maximum number of runs to inspect. + + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. + {Locked="on"}{Locked="off"}{Locked="--report-azdo"} + Invalid glob pattern {0}. 無效的 glob 模式 {0}。 @@ -212,6 +232,11 @@ '--report-azdo-flaky-history' 的值 '{0}' 無效。提供 1 到 90 之間的整數。 {0} is the invalid value. {Locked="--report-azdo-flaky-history"} + + Invalid value '{0}'. Valid values are 'on' and 'off'. + Invalid value '{0}'. Valid values are 'on' and 'off'. + {Locked="on"}{Locked="off"} + Invalid option {0}. 無效的選項 {0}。 diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs index 6678ebf796..538424450e 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs @@ -133,10 +133,14 @@ Default type is 'Full' Publish test results live to the Azure DevOps Tests tab. --report-azdo Enable Azure DevOps report generator to write errors to the output in a way that Azure DevOps understands. + --report-azdo-annotations + Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. --report-azdo-demote-known-flaky Demote failures with an Azure DevOps flaky history of at least 25% in the selected window to warnings. --report-azdo-flaky-history Query Azure DevOps test result history for the past N days (1-90) and annotate reported failures with flakiness context. + --report-azdo-groups + Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. --report-azdo-quarantine-file Path to a text file that lists quarantined test fully qualified names or glob patterns. Matching failures are reported as warnings. --report-azdo-severity @@ -409,6 +413,10 @@ This option takes precedence over the deprecated --no-progress flag. Arity: 0 Hidden: False Description: Enable Azure DevOps report generator to write errors to the output in a way that Azure DevOps understands. + --report-azdo-annotations + Arity: 1 + Hidden: False + Description: Enable or disable Azure DevOps failure annotations ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. --report-azdo-demote-known-flaky Arity: 0 Hidden: False @@ -417,6 +425,10 @@ This option takes precedence over the deprecated --no-progress flag. Arity: 1 Hidden: False Description: Query Azure DevOps test result history for the past N days (1-90) and annotate reported failures with flakiness context. + --report-azdo-groups + Arity: 1 + Hidden: False + Description: Enable or disable per-assembly Azure DevOps log groups ('on' or 'off'). Defaults to 'on'. Requires '--report-azdo'. --report-azdo-quarantine-file Arity: 1 Hidden: False diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsCommandLineProviderTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsCommandLineProviderTests.cs index ed8fdb7285..72b4f2e12b 100644 --- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsCommandLineProviderTests.cs +++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsCommandLineProviderTests.cs @@ -105,6 +105,72 @@ public async Task ValidateCommandLineOptionsAsync_ReturnsInvalid_WhenStackFrameF Assert.AreEqual(AzureDevOpsResources.AzureDevOpsStackFrameFilterRequiresAzureDevOps, validationResult.ErrorMessage); } + [TestMethod] + public async Task ValidateCommandLineOptionsAsync_ReturnsInvalid_WhenAnnotationsIsUsedWithoutAzureDevOpsAsync() + { + AzureDevOpsCommandLineProvider provider = new(); + ValidationResult validationResult = await provider.ValidateCommandLineOptionsAsync(new TestCommandLineOptions(new Dictionary + { + [AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations] = ["off"], + })).ConfigureAwait(false); + + Assert.IsFalse(validationResult.IsValid); + Assert.AreEqual(AzureDevOpsResources.AzureDevOpsAnnotationsRequiresAzureDevOps, validationResult.ErrorMessage); + } + + [TestMethod] + public async Task ValidateCommandLineOptionsAsync_ReturnsInvalid_WhenGroupsIsUsedWithoutAzureDevOpsAsync() + { + AzureDevOpsCommandLineProvider provider = new(); + ValidationResult validationResult = await provider.ValidateCommandLineOptionsAsync(new TestCommandLineOptions(new Dictionary + { + [AzureDevOpsCommandLineOptions.AzureDevOpsGroups] = ["off"], + })).ConfigureAwait(false); + + Assert.IsFalse(validationResult.IsValid); + Assert.AreEqual(AzureDevOpsResources.AzureDevOpsGroupsRequiresAzureDevOps, validationResult.ErrorMessage); + } + + [TestMethod] + public async Task ValidateOptionArgumentsAsync_ReturnsInvalid_WhenGroupsValueIsNotOnOrOffAsync() + { + AzureDevOpsCommandLineProvider provider = new(); + CommandLineOption option = provider.GetCommandLineOptions().Single(o => o.Name == AzureDevOpsCommandLineOptions.AzureDevOpsGroups); + ValidationResult validationResult = await provider.ValidateOptionArgumentsAsync(option, ["maybe"]).ConfigureAwait(false); + + Assert.IsFalse(validationResult.IsValid); + } + + [TestMethod] + public async Task ValidateOptionArgumentsAsync_ReturnsValid_WhenGroupsValueIsOffAsync() + { + AzureDevOpsCommandLineProvider provider = new(); + CommandLineOption option = provider.GetCommandLineOptions().Single(o => o.Name == AzureDevOpsCommandLineOptions.AzureDevOpsGroups); + ValidationResult validationResult = await provider.ValidateOptionArgumentsAsync(option, ["off"]).ConfigureAwait(false); + + Assert.IsTrue(validationResult.IsValid, validationResult.ErrorMessage); + } + + [TestMethod] + public async Task ValidateOptionArgumentsAsync_ReturnsInvalid_WhenAnnotationsValueIsNotOnOrOffAsync() + { + AzureDevOpsCommandLineProvider provider = new(); + CommandLineOption option = provider.GetCommandLineOptions().Single(o => o.Name == AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations); + ValidationResult validationResult = await provider.ValidateOptionArgumentsAsync(option, ["maybe"]).ConfigureAwait(false); + + Assert.IsFalse(validationResult.IsValid); + } + + [TestMethod] + public async Task ValidateOptionArgumentsAsync_ReturnsValid_WhenAnnotationsValueIsOnAsync() + { + AzureDevOpsCommandLineProvider provider = new(); + CommandLineOption option = provider.GetCommandLineOptions().Single(o => o.Name == AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations); + ValidationResult validationResult = await provider.ValidateOptionArgumentsAsync(option, ["on"]).ConfigureAwait(false); + + Assert.IsTrue(validationResult.IsValid, validationResult.ErrorMessage); + } + [TestMethod] public async Task ValidateOptionArgumentsAsync_ReturnsInvalid_WhenStackFrameFilterRegexIsInvalidAsync() { diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsConstantsTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsConstantsTests.cs index dbc3eb096d..4b349c81db 100644 --- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsConstantsTests.cs +++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsConstantsTests.cs @@ -2,6 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Extensions.AzureDevOpsReport; +using Microsoft.Testing.Extensions.Reporting; +using Microsoft.Testing.Extensions.UnitTests.Helpers; using Microsoft.Testing.Platform.Helpers; using Moq; @@ -67,4 +69,37 @@ public void IsRunningInAzureDevOps_QueriesTheCorrectEnvironmentVariable() Assert.IsTrue(AzureDevOpsConstants.IsRunningInAzureDevOps(environmentMock.Object)); environmentMock.Verify(e => e.GetEnvironmentVariable("TF_BUILD"), Times.Once); } + + [TestMethod] + public void IsFeatureKnobEnabled_ReturnsTrue_WhenKnobNotSet() + { + TestCommandLineOptions options = new([]); + Assert.IsTrue(AzureDevOpsConstants.IsFeatureKnobEnabled(options, AzureDevOpsCommandLineOptions.AzureDevOpsGroups)); + } + + [TestMethod] + [DataRow("on")] + [DataRow("On")] + [DataRow("anything")] + public void IsFeatureKnobEnabled_ReturnsTrue_WhenKnobIsNotOff(string value) + { + TestCommandLineOptions options = new(new Dictionary + { + [AzureDevOpsCommandLineOptions.AzureDevOpsGroups] = [value], + }); + Assert.IsTrue(AzureDevOpsConstants.IsFeatureKnobEnabled(options, AzureDevOpsCommandLineOptions.AzureDevOpsGroups)); + } + + [TestMethod] + [DataRow("off")] + [DataRow("OFF")] + [DataRow("Off")] + public void IsFeatureKnobEnabled_ReturnsFalse_WhenKnobIsOff(string value) + { + TestCommandLineOptions options = new(new Dictionary + { + [AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations] = [value], + }); + Assert.IsFalse(AzureDevOpsConstants.IsFeatureKnobEnabled(options, AzureDevOpsCommandLineOptions.AzureDevOpsAnnotations)); + } } diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLogGroupReporterTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLogGroupReporterTests.cs index 98fe400769..4d7a87eed6 100644 --- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLogGroupReporterTests.cs +++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLogGroupReporterTests.cs @@ -58,6 +58,20 @@ public async Task IsEnabledAsync_ReturnsTrue_WhenAzureDevOpsOptionSetAndTfBuildS Assert.IsTrue(await reporter.IsEnabledAsync()); } + [TestMethod] + public async Task IsEnabledAsync_ReturnsFalse_WhenGroupsExplicitlyOffAsync() + { + AzureDevOpsLogGroupReporter reporter = CreateReporter(enabled: true, tfBuild: true, groups: ["off"]); + Assert.IsFalse(await reporter.IsEnabledAsync()); + } + + [TestMethod] + public async Task IsEnabledAsync_ReturnsTrue_WhenGroupsExplicitlyOnAsync() + { + AzureDevOpsLogGroupReporter reporter = CreateReporter(enabled: true, tfBuild: true, groups: ["on"]); + Assert.IsTrue(await reporter.IsEnabledAsync()); + } + [TestMethod] public async Task SessionStarting_EmitsGroupHeaderWithAssemblyAndTfmAsync() { @@ -121,11 +135,16 @@ private static TestNodeUpdateMessage CreateTestNodeUpdateMessage(string uid, Tes Properties = new PropertyBag(state), }); - private AzureDevOpsLogGroupReporter CreateReporter(bool enabled, bool tfBuild) + private AzureDevOpsLogGroupReporter CreateReporter(bool enabled, bool tfBuild, string[]? groups = null) { Dictionary options = enabled ? new Dictionary { [AzureDevOpsCommandLineOptions.AzureDevOpsOptionName] = [] } : []; + if (groups is not null) + { + options[AzureDevOpsCommandLineOptions.AzureDevOpsGroups] = groups; + } + _ = _environmentMock.Setup(e => e.GetEnvironmentVariable(AzureDevOpsConstants.TfBuildEnvironmentVariableName)) .Returns(tfBuild ? AzureDevOpsConstants.TfBuildEnabledValue : null); return new AzureDevOpsLogGroupReporter(