Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions src/Cli/dotnet/Commands/CliCommandStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,9 @@ See https://aka.ms/dotnet-test/mtp for more information.</value>
<data name="DiscoveringTestsFrom" xml:space="preserve">
<value>Discovering tests from</value>
</data>
<data name="DotnetTestCommand" xml:space="preserve">
<value>.NET Test Command</value>
<data name="DotnetTestCommandMTPDescription" xml:space="preserve">
<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>
<comment>{Locked="global.json"}{Locked="Microsoft.Testing.Platform"}{Locked="VSTest"}</comment>
</data>
<data name="DownloadingPackToCacheMessage" xml:space="preserve">
<value>Downloading pack {0} version {1} to offline cache {2}...</value>
Expand Down Expand Up @@ -1994,8 +1995,9 @@ Your project targets multiple frameworks. Specify which framework to run using '
<data name="TempDirOptionDescription" xml:space="preserve">
<value>Specify a temporary directory for this command to download and extract NuGet packages (must be secure).</value>
</data>
<data name="TestAppFullName" xml:space="preserve">
<value>.NET Test Driver</value>
<data name="DotnetTestCommandVSTestDescription" xml:space="preserve">
<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>
<comment>{Locked="global.json"}{Locked="Microsoft.Testing.Platform"}{Locked="VSTest"}</comment>
</data>
<data name="TestCmdNoLogo" xml:space="preserve">
<value>Run test(s), without displaying Microsoft Testplatform banner</value>
Expand Down Expand Up @@ -2698,4 +2700,25 @@ Proceed?</value>
<value>Received 'ExecutionId' of value '{0}' for message '{1}' while the 'ExecutionId' received of the handshake message was '{2}'.</value>
<comment>{Locked="ExecutionId"}</comment>
</data>
</root>
<data name="ErrorColon" xml:space="preserve">
<value>error:</value>
</data>
<data name="TotalColon" xml:space="preserve">
<value>total:</value>
</data>
<data name="Retried" xml:space="preserve">
<value>retried</value>
</data>
<data name="FailedColon" xml:space="preserve">
<value>failed:</value>
</data>
<data name="SucceededColon" xml:space="preserve">
<value>succeeded:</value>
</data>
<data name="SkippedColon" xml:space="preserve">
<value>skipped:</value>
</data>
<data name="DurationColon" xml:space="preserve">
<value>duration:</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static void Append(ITerminal terminal, TimeSpan duration, bool wrapInPare
terminal.Append('(');
}

// TODO: Do these abbrevations (d for days, h for hours, etc) need to be localized?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @baronfel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have opened an issue to follow-up.

if (duration.Days > 0)
{
terminal.Append($"{duration.Days}d");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ private void AppendTestRunSummary(ITerminal terminal, int? exitCode)
bool colorizePassed = passed > 0 && _buildErrorsCount == 0 && failed == 0 && error == 0;
bool colorizeSkipped = skipped > 0 && skipped == total && _buildErrorsCount == 0 && failed == 0 && error == 0;

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

if (error > 0)
{
Expand Down
5 changes: 2 additions & 3 deletions src/Cli/dotnet/Commands/Test/TestCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.DotNet.Cli.Extensions;
using Microsoft.DotNet.Cli.Utils;
using Command = System.CommandLine.Command;

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

private static Command GetTestingPlatformCliCommand()
{
var command = new MicrosoftTestingPlatformTestCommand("test", CliCommandStrings.DotnetTestCommand);
var command = new MicrosoftTestingPlatformTestCommand("test", CliCommandStrings.DotnetTestCommandMTPDescription);
command.SetAction(parseResult => command.Run(parseResult));
command.Options.Add(MicrosoftTestingPlatformOptions.ProjectOption);
command.Options.Add(MicrosoftTestingPlatformOptions.SolutionOption);
Expand Down Expand Up @@ -268,7 +267,7 @@ private static Command GetTestingPlatformCliCommand()

private static Command GetVSTestCliCommand()
{
DocumentedCommand command = new("test", DocsLink, CliCommandStrings.TestAppFullName)
DocumentedCommand command = new("test", DocsLink, CliCommandStrings.DotnetTestCommandVSTestDescription)
{
TreatUnmatchedTokensAsErrors = false
};
Expand Down
1 change: 0 additions & 1 deletion src/Cli/dotnet/Commands/Test/VSTest/TestCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Frozen;
using System.CommandLine;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Versioning;
Expand Down
53 changes: 44 additions & 9 deletions src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 44 additions & 9 deletions src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading