xunit / visualstudio.xunit

VSTest runner for xUnit.net (for Visual Studio Test Explorer and dotnet test)
https://xunit.net/
Other
146 stars 81 forks source link

How to run a single theory case with `dotnet test` filters #387

Closed farlee2121 closed 1 year ago

farlee2121 commented 1 year ago

Is it possible to run a single theory case via the dotnet cli?

I've tried a variety of filter expressions.

Matching the exact name found in trx or by --list-tests doesn't seem to work example: (FullyQualifiedName=XUnitTests.theoryTest\(x: 2, y: 2, sum: 4\)) -> matches no tests

In fact, it appears to stop finding tests once the first parenthesis is added (FullyQualifiedName~XUnitTests.theoryTest\() -> no matched tests

I also notice that filtering for the test method name exactly finds all of the theory cases (FullyQualifiedName=XUnitTests.theoryTest)

I'm trying to better support xUnit theories in the Ionide test explorer

bradwilson commented 1 year ago

You should be able to use DisplayName rather than FullyQualifiedName.

farlee2121 commented 1 year ago

That works! Thank you!