I have a project that has
[TestFixture, Category("Oracle")]
and
[TestFixture, Category("OracleOdbc")]
with a couple of tests that I would like to run separately with dotnet test.
Here is what I tried after doing some googling:
dotnet test MyProject.csproj --where "cat==Oracle" but this switch no longer exists.dotnet test MyProject.csproj --filter Category="Oracle"0 gives the applicable tests: No test is available in....
Then I stumbled upon this article and, although it describes MSTest (and NUnit has TestCategoryAttribute CategoryAttributeand not TestCategoryAttribute), I tried
dotnet test MyProject.csproj --filter TestCategory="Oracle"
. "Oracle" . . dotnet test MyProject.csproj --filter TestCategory="OracleOdbc", dotnet test MyProject.csproj --filter TestCategory="OracleOdbc" , "Oracle" "OracleOdbc". , TestCategroy NUnit .
.NET Command Line Tools (2.1.2) :
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.7" />
, , , - netcoreapp2.0 net462.