From 7dadb95d3cdad38712378e3fac193fce8eb4bb2a Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Fri, 16 Dec 2016 18:50:19 -0800 Subject: [PATCH] Fixing dotnet test help text (#5032) Renaming --test-case-filter to just --filter to make it easier to use. Placing more examples and more clarity for the --filter command. Fixes #5021 --- src/dotnet/commands/dotnet-test/LocalizableStrings.cs | 7 +++++-- src/dotnet/commands/dotnet-test/Program.cs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dotnet/commands/dotnet-test/LocalizableStrings.cs b/src/dotnet/commands/dotnet-test/LocalizableStrings.cs index 350aea866..542b67c14 100644 --- a/src/dotnet/commands/dotnet-test/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-test/LocalizableStrings.cs @@ -20,8 +20,11 @@ public const string CmdTestCaseFilterDescription = @"Run tests that match the given expression. Examples: - --test-case-filter:""Priority = 1"" - --test-case-filter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)"""; + Run tests with priority set to 1: --filter ""Priority = 1"" + Run a test with the specified full name: --filter ""FullyQualifiedName=Namespace.ClassName.MethodName"" + Run tests that contain the specified name: --filter ""FullyQualifiedName~Namespace.Class"" + More info on filtering support: https://aka.ms/vstest-filtering + "; public const string CmdTestAdapterPathDescription = @"Use custom adapters from the given path in the test run. Example: --test-adapter-path:"; diff --git a/src/dotnet/commands/dotnet-test/Program.cs b/src/dotnet/commands/dotnet-test/Program.cs index 533b27d1d..f15e61cdd 100644 --- a/src/dotnet/commands/dotnet-test/Program.cs +++ b/src/dotnet/commands/dotnet-test/Program.cs @@ -44,7 +44,7 @@ namespace Microsoft.DotNet.Tools.Test CommandOptionType.NoValue); var testCaseFilterOption = cmd.Option( - $"--test-case-filter <{LocalizableStrings.CmdTestCaseFilterExpression}>", + $"--filter <{LocalizableStrings.CmdTestCaseFilterExpression}>", LocalizableStrings.CmdTestCaseFilterDescription, CommandOptionType.SingleValue);