joaoopereira / dotnet-test-rerun

automatic rerun dotnet failed tests
https://www.nuget.org/packages/dotnet-test-rerun
GNU General Public License v3.0
28 stars 7 forks source link

Provide the ability to run all test projects using a glob pattern #117

Open dgkanatsios opened 10 months ago

dgkanatsios commented 10 months ago

Currently, the DotNet test ADO task allows to run test projects using a glob pattern. For example,

 - task: DotNetCoreCLI@2
    displayName: Run tests
    inputs:
      command: 'test'
      projects: 'src/**/*.[Tt]est?(s).csproj'

This will recursively search all folders for files matching this pattern. It would be great if the tool supported this.

PS. There is a workaround to add all test .csproj files to a solution (.sln). However, this increases the execution time, since on retry, the tool will try and search for the failed tests in all .csproj projects in the .sln file.

ricardofslp commented 10 months ago

Hi @dgkanatsios,

Currently we are supporting the ways of searching for tests that dotnet test also allows. I think this tool does some magic in trying to find the projects to actually run.

We will take a look to see if we can do something that could have a similar effect that would make sense to be supported