Skip to content

Truncated test failure messages #5141

Closed
dotnet/dotnet
#551
@MichaelSimons

Description

@MichaelSimons

The UX is less than ideal when there is a test failure in the BaselineHelper. This is an examples from #5122:

Assert.Null() Failure: Value is not null
Expected: null
Actual:   "\nExpected file '/__w/1/s/artifacts/bin/Microsoft."···

The assert used here is Assert.Null(message);

A quick search suggests this is a known truncation. The recommendation is to use the following pattern instead:

Assert.True(message == null, message);

This suggestion should be vetted.

Metadata

Metadata

Labels

area-testingImprovements in CI and testing

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions