-
Notifications
You must be signed in to change notification settings - Fork 684
TestsReportGenerator: Always show the error message, and truncate only the stdout #9335
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that the combined error message and stdout are no longer both truncated, so that the error message is fully visible while only the stdout is truncated.
- Removed separate StringBuilder for error messages and its truncation logic.
- Integrated error message display directly into the report, with stdout being truncated separately.
Comments suppressed due to low confidence (1)
tools/GenerateTestSummary/TestSummaryGenerator.cs:150
- [nitpick] Verify that using '```yml' as the code block delimiter for error messages is appropriate, as the error content might not adhere to YAML formatting.
reportBuilder.AppendLine(test.Output?.ErrorInfo?.InnerText ?? string.Empty);
var errorMsgBuilder = new StringBuilder(); | ||
errorMsgBuilder.AppendLine(test.Output?.ErrorInfo?.InnerText ?? string.Empty); | ||
reportBuilder.AppendLine(); | ||
reportBuilder.AppendLine("```yml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yml? do you mean text maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to provide a nice coloring!
Co-authored-by: Dan Moseley <[email protected]>
feedback: `what about taking the first 25_000, the last 25_000, and removing any overlap. So all you lose is in the middle` ``` | [2025-05-15T16:36:23] Aspire.Hosting.Tests.Resources.backend Information: 29: 2025-05-15T16:36:23.8940000Z 14da29b7e816: Download complete | [2025-05-15T16:36:23] Aspire.Hosting.Tests.Resources.backend Information: 30: 2025-05-15T16 ... (snip) ... ... sources.yarp Information: 50: 2025-05-15T16:36:28.1672245Z dbug: Microsoft.Extensions.ServiceDiscovery.ServiceEndpointWatcher[1] | [2025-05-15T16:36:28] Aspire.Hosting.Tests.Resources.yarp Information: 51: 2025-05-15T16:36:28.1672374Z Resolving endpoints for service 'http://backend'. ```
…cesWithMultipleReplicas Issue: dotnet#9340
The combined error message and stdout were being truncated, which meant that the former would not show, like:
Also: