Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSTestResult does not report startTime #359

Open
nohwnd opened this issue Jan 10, 2023 · 1 comment
Open

VSTestResult does not report startTime #359

nohwnd opened this issue Jan 10, 2023 · 1 comment

Comments

@nohwnd
Copy link
Contributor

nohwnd commented Jan 10, 2023

Trx includes StartTime and EndTime, and VSTest sets those values to the current timestamp for "backward compatibility". Xunit does not report start time or end time, just duration.

Would you be open to start tracking this information? I can make a PR.

Duration = TimeSpan.FromSeconds(executionTime),

https://github.com/microsoft/vstest/blob/b2e2126f1aa7e5753cafe9515563c99ade6a59ce/src/Microsoft.TestPlatform.ObjectModel/TestResult.cs#L34

@bradwilson
Copy link
Member

Yes, this can be approximated today for v1 & v2 tests with the arrival of the start message. We would just need to stash that information away so it could be retrieved when creating the VSTest TestResult after the test has finished.

For v3, we can add this explicitly (we were already planning to do this with assembly starting, but it can be easily added for all start messages).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants