dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.75k stars 1.07k forks source link

"dotnet test" using the glob pattern #30655

Open MisinformedDNA opened 1 year ago

MisinformedDNA commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to test multiple projects at the same time using the glob pattern.

Describe the solution you'd like

In Azure DevOps, I can use the DotNetCoreCLI task to test multiple projects using the glob pattern. If I don't want to use the task, or can't because I'm on a different CI system, there isn't a great option for creating a single run with a resulting single file for test results and a single file for code coverage.

I would love to be able to do something like this:

dotnet test "test/**/*.csproj"

Note: A similar issue already exists for publish.

nohwnd commented 1 year ago

Thank you for the suggestion, providing sln or a csproj to dotnet test forwards it to msbuild, so unless msbuild offers this functionality we won't be able to do it.