testfx
testfx copied to clipboard
What is Duration, startTime and endTime in trx report?
Steps to reproduce
Just generate trx file with following command: dotnet test --filter Category=Test --logger:trx;LogFileName=results.trx
Environment
- Windows 10 x64, NET 5.0, Visual Studio Community 16.8.4
- SpecFlow 3.6.23, SpecFlow.Tools.MsBuild.Generation 3.6.23, SpecFlow.xUnit 3.6.23, xunit.runner.visualstudio 2.4.3, Microsoft.NET.Test.Sdk 16.8.3, FluentAssertions 5.10.3
In trx file I can see following sections: duration, startTime, endTime. I couldn't figure out how the time is calculated?
I found these fields in code: https://github.com/microsoft/testfx/blob/ec18af6f90c272f68f48d9d0b94c71b8e276c7a0/src/Adapter/MSTest.CoreAdapter/Execution/TestExecutionManager.cs#L376
https://github.com/microsoft/testfx/blob/ec18af6f90c272f68f48d9d0b94c71b8e276c7a0/src/Adapter/MSTest.CoreAdapter/Execution/TestMethodInfo.cs#L159