How do I run specific tests using dotnet test?

With the dotnet version 1.0.0, you have to use the –filter option:

You can filter by DisplayName, FullyQualifiedName and Traits.

Ex:

dotnet test --filter "FullyQualifiedName=YourNamespace.TestClass1.Test1"

Also, these operators are allowed: =, != and ~ (contains).

More info here: docs

Leave a Comment