microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
228 stars 12 forks source link

[SUGGESTION] Add configuration to pass extra filters when running tests from Test Explorer #365

Open tverboon opened 1 year ago

tverboon commented 1 year ago

Describe the feature you'd like

We have a couple of system integration tests we don't want to run in a normal test run. In VSCode we have test tasks that passes a filter to dotnet test command to exclude these tests. Like this: dotnet test --filter Category!=SystemIntegration

It would be nice if we could configure extra arguments that will be passed to the dotnet test command when running the tests from Test Explorer.

Alternatives considered

No response

Environment Information

OS: macOS Visual Studio Code: 1.81.0 Extension:

eisenpony commented 7 months ago

In my case I want to configure the dotnet test command to use a relative path. Using the FQ path prevents the transitive dependency discovery from working correctly.

tverboon commented 6 months ago

I managed to do what I wanted with a .runsettings file.

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <RunConfiguration>
    <TestCaseFilter>(Category!=SystemIntegration)</TestCaseFilter>
    <MaxCpuCount>0</MaxCpuCount>
  </RunConfiguration>
</RunSettings>
PindaPixel commented 3 months ago

I would like to have a little bit of configuration over how the test explorer runs my test. In my specific case I need to add some /property arguments