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

TRX writer emits Min as outcome instead of Error in .NET 7.0 #4227

Closed
aelij opened this issue Dec 26, 2022 · 2 comments · Fixed by #4243
Closed

TRX writer emits Min as outcome instead of Error in .NET 7.0 #4227

aelij opened this issue Dec 26, 2022 · 2 comments · Fixed by #4243
Labels

Comments

@aelij
Copy link
Member

aelij commented Dec 26, 2022

Description

When using dotnet test -l trx in .NET 7.0, the TRX file writes an unexpected enum value (due to an undocumented change in .NET 7.0's Enum.ToString()).

Steps to reproduce

See above

Expected behavior

<RunInfo outcome="Error" ...

Actual behavior

<RunInfo outcome="Min" ...

Environment

> dotnet --info
.NET SDK:
 Version:   7.0.101
 Commit:    bb24aafa11

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.101\

Host:
  Version:      7.0.1
  Architecture: x64
  Commit:       97203d38ba

.NET SDKs installed:
  7.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@Evangelink Evangelink added the needs-triage This item should be discussed in the next triage meeting. label Dec 27, 2022
@Evangelink
Copy link
Member

Hi @aelij, thank you for the bug report. We will investigate it soon and get back to you.

@aelij
Copy link
Member Author

aelij commented Dec 27, 2022

Note that according to Enum.ToString docs

If multiple enumeration members have the same underlying value and you attempt to retrieve the string representation of an enumeration member's name based on its underlying value, your code should not make any assumptions about which name the method will return

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