I'm trying to test my .NET Core 5.0 projects in my Azure DevOps pipeline. When using a full path to one of my test projects the pipeline will test that single project. When using a pattern to search for all my test projects he can't find one of them.
My project structure is as follows:
- backend
- DemoProject (with the .sln file)
- DemoProject.Application
- DemoProject.Application.Test
- DemoProject.Persistance
- DemoProject.Persistance.Test
- DemoProject 2
- ....
- DemoProject (with the .sln file)
To find a solution I created a simple version of my pipeline template:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: './backend/DemoProject/DemoProject.Application.Tests/DemoProject.Application.Tests.csproj'
When using the full path (./backend/DemoProject/DemoProject.Application.Tests/DemoProject.Application.Tests.csproj
), the pipeline find's the selected project. When using a pattern (./backend/DemoProject/\*\*/\*.Tests.csproj
or ./backend/DemoProject/\*\*/DemoProject.Application.Tests.csproj
), the pipeline can't find any project.
Does someone knows what the correct pattern is to run all my test projects inside the DemoProject folder?