Using the test
command with DotNetCoreCLI@2
allows you to run dotnet test against multiple projects in a single task. DotNetCoreCLI allows the passing of a testRunTitle
which is subsequently used when the results are published to Azure DevOps' Test Run page. At present I cannot see that it is possible to set the testRunTitle
to be different for each project, or an option that would set testRunTitle
to the project name. This means that all test projects publish a separate set of results but using the same name - VSTest Test Run Release
, and thus the project for a given test run cannot be easily identified without drilling down.
An example task usage:
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: 'test'
projects: |
**/*.Test/*.csproj
configuration: $(buildConfiguration)
arguments: '--configuration $(buildConfiguration)'
As above, if testRunTitle
is set - it will use the same title for every project, which doesn't help at all.
Ideally the underlying code would just use the project name instead of VSTest Test Run
, by passing the project name explicitly instead of an empty string (which looks to be the correct behaviour in the underlying code).
Type: Feature
Task Name: DotNetCoreCLIv2
Environment: Azure Pipelines
We pick issues based on priority and traction from the community. Closing this as not high pri right now. Thankyou
Translation: Your problem isn't important enough to consider. Go pound sand.
I'm surprised, right now this means all projects show as MyProject_1, MyProject_2, MyProject_3... is it not a problem for everyone who has multiple projects? Or something's missing in my understanding? Just being able to pass a variable such as $(TestProjectName) or something like that would at least allow a workaround.