Skip to content

Commit f50aa2b

Browse files
authored
Add example of escaping double quotes (#44158)
1 parent 6a972ba commit f50aa2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/core/testing/selective-unit-tests.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ For `FullyQualifiedName` values that include a comma for generic type parameters
5656
dotnet test --filter "FullyQualifiedName=MyNamespace.MyTestsClass<ParameterType1%2CParameterType2>.MyTestMethod"
5757
```
5858

59+
For `Name` or `DisplayName`, use the URL encoding for the special characters. For example, to run a test with the name `MyTestMethod` and a string value `"text"`, use the following filter:
60+
61+
```dotnetcli
62+
dotnet test --filter "Name=MyTestMethod \(%22text%22\)"
63+
```
64+
5965
:::zone pivot="mstest"
6066

6167
## MSTest examples

0 commit comments

Comments
 (0)