ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
850 stars 276 forks source link

Xunit theory filter #1943

Closed farlee2121 closed 9 months ago

farlee2121 commented 9 months ago

WHAT

1935

1936 got parameterized tests running as part of larger groups.

This PR continues that work and allows individual cases to be run individually from the test explorer (i.e. clicking the run button on a theory case in the test explorer)

Note that for MSTest, it will actually run all of the theory cases because there doesn't appear to be a way to filter to a single parameterized test case in MSTest. It'll still look right, but multiple cases will be run if they try to debug. All other frameworks (xUnit, nUnit, Expecto) can run individual parameterized cases and will debug as expected.

HOW

Mostly through modifying how we build the dotnet test filter expressions based on which test framework the project uses.

Nesting Deferred

I decided not to tackle nesting parameterized cases under a dedicated parent item in the test explorer (like Visual Studio does). I'm still contemplating the options. Breaking the assumption that the explorer hierarchy matches the test name hierarchy could cause a lot of problems and complexity.