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

Time is reported incorrectly for xunit when different verbosity is used #4894

Open
nohwnd opened this issue Feb 13, 2024 · 2 comments
Open

Comments

@nohwnd
Copy link
Member

nohwnd commented Feb 13, 2024

full issue is in here in dotnet repo: dotnet/runtime#98205 (comment)

This is probably linked to the fact that normal console logger is measuring execution by datetime.now and the minimal output logger is collecting first and last test from each dll, and then reporting the diff.

@bradwilson
Copy link

minimal output logger is collecting first and last test from each dll, and then reporting the diff.

I'll admit, you knocked me over with that. 😂

@rmunn
Copy link

rmunn commented Feb 14, 2024

Reproduction:

  • Clone https://github.com/rmunn/dotnet-test-xunit-timing-repro
  • Run dotnet test /v:q. Test duration is wrong: first test is not counted in total duration.
  • Run dotnet test /v:n. Test duration is still wrong, in the same way.
  • Run dotnet test --logger "console;verbosity=quiet". Test duration is still wrong, in the same way.
  • Run dotnet test --logger "console;verbosity=normal". Test duration is correct.

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

No branches or pull requests

3 participants