When results are logged to to a TRX file, the totals in the ResultSummary tag seem to count anything with a resultType of DataDrivenTest twice. The console summary gives the correct total, so sometimes the TRX file and console output will have different passed/failed/total/etc numbers for the exact same test run.
Maybe these are being double-counted because each DataDrivenTest result has two nested UnitTestResult tags? I also noticed that the "Passed" dialog gets logged twice in console output for these tests, once with the function name and once with the DisplayName from the DataRow attribute.
Reproduced this in a project that had a single test with a DataRow attribute. Results and logs below (converted to .txt, identifying details scrubbed out):
consoleoutput.txt
ExampleTRX_2026-04-07_16_34_16.txt
log.txt
log.host.26-04-07_16-34-15_58568_5.txt
The command for this test run was vstest.console.exe --Logger:trx --Logger:console --Diag:log.text <project path>/Build/UnitTests/net10.0/ExampleProject.UnitTests.dll > consoleoutput.txt.
When results are logged to to a TRX file, the totals in the ResultSummary tag seem to count anything with a resultType of DataDrivenTest twice. The console summary gives the correct total, so sometimes the TRX file and console output will have different passed/failed/total/etc numbers for the exact same test run.
Maybe these are being double-counted because each DataDrivenTest result has two nested UnitTestResult tags? I also noticed that the "Passed" dialog gets logged twice in console output for these tests, once with the function name and once with the DisplayName from the DataRow attribute.
Reproduced this in a project that had a single test with a DataRow attribute. Results and logs below (converted to .txt, identifying details scrubbed out):
consoleoutput.txt
ExampleTRX_2026-04-07_16_34_16.txt
log.txt
log.host.26-04-07_16-34-15_58568_5.txt
The command for this test run was
vstest.console.exe --Logger:trx --Logger:console --Diag:log.text <project path>/Build/UnitTests/net10.0/ExampleProject.UnitTests.dll > consoleoutput.txt.