testfx icon indicating copy to clipboard operation
testfx copied to clipboard

What is Duration, startTime and endTime in trx report?

Open vadim-96 opened this issue 4 years ago • 0 comments

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? trx 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

vadim-96 avatar Feb 05 '21 11:02 vadim-96