Skip to content

Commit f28bd1f

Browse files
authored
Merge branch 'release/10.0.1xx' into locfiles/ee993b60-50a2-4cf8-8e33-35cf6b2ef30b
2 parents 61c329e + 1a573af commit f28bd1f

File tree

7 files changed

+40
-18
lines changed

7 files changed

+40
-18
lines changed

src/Cli/dotnet/Commands/CliCommandStrings.resx

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,9 @@ See https://aka.ms/dotnet-test/mtp for more information.</value>
804804
<data name="DiscoveringTestsFrom" xml:space="preserve">
805805
<value>Discovering tests from</value>
806806
</data>
807-
<data name="DotnetTestCommand" xml:space="preserve">
808-
<value>.NET Test Command</value>
807+
<data name="DotnetTestCommandMTPDescription" xml:space="preserve">
808+
<value>.NET Test Command for Microsoft.Testing.Platform (opted-in via 'global.json' file). This only supports Microsoft.Testing.Platform and doesn't support VSTest. For more information, see https://aka.ms/dotnet-test.</value>
809+
<comment>{Locked="global.json"}{Locked="Microsoft.Testing.Platform"}{Locked="VSTest"}</comment>
809810
</data>
810811
<data name="DownloadingPackToCacheMessage" xml:space="preserve">
811812
<value>Downloading pack {0} version {1} to offline cache {2}...</value>
@@ -1994,8 +1995,9 @@ Your project targets multiple frameworks. Specify which framework to run using '
19941995
<data name="TempDirOptionDescription" xml:space="preserve">
19951996
<value>Specify a temporary directory for this command to download and extract NuGet packages (must be secure).</value>
19961997
</data>
1997-
<data name="TestAppFullName" xml:space="preserve">
1998-
<value>.NET Test Driver</value>
1998+
<data name="DotnetTestCommandVSTestDescription" xml:space="preserve">
1999+
<value>.NET Test Command for VSTest. To use Microsoft.Testing.Platform, opt-in to the Microsoft.Testing.Platform-based command via global.json. For more information, see https://aka.ms/dotnet-test.</value>
2000+
<comment>{Locked="global.json"}{Locked="Microsoft.Testing.Platform"}{Locked="VSTest"}</comment>
19992001
</data>
20002002
<data name="TestCmdNoLogo" xml:space="preserve">
20012003
<value>Run test(s), without displaying Microsoft Testplatform banner</value>
@@ -2698,4 +2700,25 @@ Proceed?</value>
26982700
<value>Received 'ExecutionId' of value '{0}' for message '{1}' while the 'ExecutionId' received of the handshake message was '{2}'.</value>
26992701
<comment>{Locked="ExecutionId"}</comment>
27002702
</data>
2701-
</root>
2703+
<data name="ErrorColon" xml:space="preserve">
2704+
<value>error:</value>
2705+
</data>
2706+
<data name="TotalColon" xml:space="preserve">
2707+
<value>total:</value>
2708+
</data>
2709+
<data name="Retried" xml:space="preserve">
2710+
<value>retried</value>
2711+
</data>
2712+
<data name="FailedColon" xml:space="preserve">
2713+
<value>failed:</value>
2714+
</data>
2715+
<data name="SucceededColon" xml:space="preserve">
2716+
<value>succeeded:</value>
2717+
</data>
2718+
<data name="SkippedColon" xml:space="preserve">
2719+
<value>skipped:</value>
2720+
</data>
2721+
<data name="DurationColon" xml:space="preserve">
2722+
<value>duration:</value>
2723+
</data>
2724+
</root>

src/Cli/dotnet/Commands/Test/MTP/Terminal/HumanReadableDurationFormatter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public static void Append(ITerminal terminal, TimeSpan duration, bool wrapInPare
1616
terminal.Append('(');
1717
}
1818

19+
// TODO: Do these abbrevations (d for days, h for hours, etc) need to be localized?
1920
if (duration.Days > 0)
2021
{
2122
terminal.Append($"{duration.Days}d");

src/Cli/dotnet/Commands/Test/MTP/Terminal/TerminalTestReporter.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ private void AppendTestRunSummary(ITerminal terminal, int? exitCode)
280280
bool colorizePassed = passed > 0 && _buildErrorsCount == 0 && failed == 0 && error == 0;
281281
bool colorizeSkipped = skipped > 0 && skipped == total && _buildErrorsCount == 0 && failed == 0 && error == 0;
282282

283-
string errorText = $"{SingleIndentation}error: {error}";
284-
string totalText = $"{SingleIndentation}total: {total}";
285-
string retriedText = $" (+{retried} retried)";
286-
string failedText = $"{SingleIndentation}failed: {failed}";
287-
string passedText = $"{SingleIndentation}succeeded: {passed}";
288-
string skippedText = $"{SingleIndentation}skipped: {skipped}";
289-
string durationText = $"{SingleIndentation}duration: ";
283+
string errorText = $"{SingleIndentation}{CliCommandStrings.ErrorColon} {error}";
284+
string totalText = $"{SingleIndentation}{CliCommandStrings.TotalColon} {total}";
285+
string retriedText = $" (+{retried} {CliCommandStrings.Retried})";
286+
string failedText = $"{SingleIndentation}{CliCommandStrings.FailedColon} {failed}";
287+
string passedText = $"{SingleIndentation}{CliCommandStrings.SucceededColon} {passed}";
288+
string skippedText = $"{SingleIndentation}{CliCommandStrings.SkippedColon} {skipped}";
289+
string durationText = $"{SingleIndentation}{CliCommandStrings.DurationColon} ";
290290

291291
if (error > 0)
292292
{

src/Cli/dotnet/Commands/Test/TestCommandParser.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Text.Json;
66
using System.Text.Json.Serialization;
77
using Microsoft.DotNet.Cli.Extensions;
8-
using Microsoft.DotNet.Cli.Utils;
98
using Command = System.CommandLine.Command;
109

1110
namespace Microsoft.DotNet.Cli.Commands.Test;
@@ -234,7 +233,7 @@ private static Command ConstructCommand()
234233

235234
private static Command GetTestingPlatformCliCommand()
236235
{
237-
var command = new MicrosoftTestingPlatformTestCommand("test", CliCommandStrings.DotnetTestCommand);
236+
var command = new MicrosoftTestingPlatformTestCommand("test", CliCommandStrings.DotnetTestCommandMTPDescription);
238237
command.SetAction(parseResult => command.Run(parseResult));
239238
command.Options.Add(MicrosoftTestingPlatformOptions.ProjectOption);
240239
command.Options.Add(MicrosoftTestingPlatformOptions.SolutionOption);
@@ -268,7 +267,7 @@ private static Command GetTestingPlatformCliCommand()
268267

269268
private static Command GetVSTestCliCommand()
270269
{
271-
DocumentedCommand command = new("test", DocsLink, CliCommandStrings.TestAppFullName)
270+
DocumentedCommand command = new("test", DocsLink, CliCommandStrings.DotnetTestCommandVSTestDescription)
272271
{
273272
TreatUnmatchedTokensAsErrors = false
274273
};

src/Cli/dotnet/Commands/Test/VSTest/TestCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.Collections.Frozen;
54
using System.CommandLine;
65
using System.Diagnostics.CodeAnalysis;
76
using System.Runtime.Versioning;

test/dotnet.Tests/CompletionTests/snapshots/pwsh/DotnetCliSnapshotTests.VerifyCompletions.verified.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Register-ArgumentCompleter -Native -CommandName 'testhost' -ScriptBlock {
4848
[CompletionResult]::new('solution', 'solution', [CompletionResultType]::ParameterValue, ".NET modify solution file command")
4949
[CompletionResult]::new('solution', 'sln', [CompletionResultType]::ParameterValue, ".NET modify solution file command")
5050
[CompletionResult]::new('store', 'store', [CompletionResultType]::ParameterValue, "Stores the specified assemblies for the .NET Platform. By default, these will be optimized for the target runtime and framework.")
51-
[CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, ".NET Test Driver")
51+
[CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, ".NET Test Command for VSTest. To use Microsoft.Testing.Platform, opt-in to the Microsoft.Testing.Platform-based command via global.json. For more information, see https://aka.ms/dotnet-test.")
5252
[CompletionResult]::new('tool', 'tool', [CompletionResultType]::ParameterValue, "Install or work with tools that extend the .NET experience.")
5353
[CompletionResult]::new('vstest', 'vstest', [CompletionResultType]::ParameterValue, "vstest")
5454
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, ".NET CLI help utility")

test/dotnet.Tests/CompletionTests/snapshots/zsh/DotnetCliSnapshotTests.VerifyCompletions.verified.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ _testhost_commands() {
14931493
'run:.NET Run Command' \
14941494
'solution:.NET modify solution file command' \
14951495
'store:Stores the specified assemblies for the .NET Platform. By default, these will be optimized for the target runtime and framework.' \
1496-
'test:.NET Test Driver' \
1496+
'test:.NET Test Command for VSTest. To use Microsoft.Testing.Platform, opt-in to the Microsoft.Testing.Platform-based command via global.json. For more information, see https\://aka.ms/dotnet-test.' \
14971497
'tool:Install or work with tools that extend the .NET experience.' \
14981498
'vstest:' \
14991499
'help:.NET CLI help utility' \

0 commit comments

Comments
 (0)