Description
When I run dotnet test command on the solution that contains multiple test projects and use trx (or other logger) the test log file contains only data from the last test project that was run.
This issue is similar to the one described in #1603 , but it is for multiple projects within a solution instead of multiple targets.
Steps to reproduce
- Have a solution that has more than one test projects (NUnit test projects in my case).
- Run the following test command
dotnet test <PathToSolutionFile> --test-adapter-path:. --logger:"trx;LogFileName=Regression.trx" --results-directory "<PathToResultsDirectory>"
Command I'm running:
dotnet test <PathToSolutionFile> --test-adapter-path:. --logger:"junit;LogFileName=Regression.xml" --logger:"trx;LogFileName=Regression.trx" --logger:"console;verbosity=normal" --results-directory ".\test-result"
Example repository:
https://github.com/gkalnytskyi/MultiTestSolutionExample
Command for example repository:
dotnet test .\MultiTestSolutionExample.sln --test-adapter-path:. --logger:"trx;LogFileName=Regression.trx" --results-directory ".\test-results"
Expected behavior
I expect that results will be collated into a single trx log file arranged by namespace as with the case of single project with multiple TestFixtures.
Actual behavior
Projects in the solution are executed, but log file Regression.trx contains only test results from the last project executed.
Diagnostic logs
Environment
Relevant subset of package references for all test projects:
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="JunitXml.TestLogger" Version="3.0.98" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
</ItemGroup>
Operating system: Windows 10 Enterprise 10.0.17134
Solution target: netcoreapp3.1
Dotnet Core: 5.0.301
Microsoft.NET.Test.Sdk: 16.11.0
VSTest.Console.exe: 16.10.0
Description
When I run
dotnet testcommand on the solution that contains multiple test projects and usetrx(or other logger) the test log file contains only data from the last test project that was run.This issue is similar to the one described in #1603 , but it is for multiple projects within a solution instead of multiple targets.
Steps to reproduce
dotnet test <PathToSolutionFile> --test-adapter-path:. --logger:"trx;LogFileName=Regression.trx" --results-directory "<PathToResultsDirectory>"Command I'm running:
dotnet test <PathToSolutionFile> --test-adapter-path:. --logger:"junit;LogFileName=Regression.xml" --logger:"trx;LogFileName=Regression.trx" --logger:"console;verbosity=normal" --results-directory ".\test-result"Example repository:
https://github.com/gkalnytskyi/MultiTestSolutionExample
Command for example repository:
dotnet test .\MultiTestSolutionExample.sln --test-adapter-path:. --logger:"trx;LogFileName=Regression.trx" --results-directory ".\test-results"Expected behavior
I expect that results will be collated into a single
trxlog file arranged by namespace as with the case of single project with multiple TestFixtures.Actual behavior
Projects in the solution are executed, but log file
Regression.trxcontains only test results from the last project executed.Diagnostic logs
Environment
Relevant subset of package references for all test projects:
Operating system: Windows 10 Enterprise 10.0.17134
Solution target: netcoreapp3.1
Dotnet Core: 5.0.301
Microsoft.NET.Test.Sdk: 16.11.0
VSTest.Console.exe: 16.10.0