TestsReportGenerator: Always show the error message, and truncate only the stdout#9335
Merged
radical merged 5 commits intodotnet:mainfrom May 15, 2025
Merged
TestsReportGenerator: Always show the error message, and truncate only the stdout#9335radical merged 5 commits intodotnet:mainfrom
radical merged 5 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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);
danmoseley
reviewed
May 15, 2025
| var errorMsgBuilder = new StringBuilder(); | ||
| errorMsgBuilder.AppendLine(test.Output?.ErrorInfo?.InnerText ?? string.Empty); | ||
| reportBuilder.AppendLine(); | ||
| reportBuilder.AppendLine("```yml"); |
Member
There was a problem hiding this comment.
yml? do you mean text maybe?
Member
Author
There was a problem hiding this comment.
That seems to provide a nice coloring!
danmoseley
reviewed
May 15, 2025
Co-authored-by: Dan Moseley <danmose@microsoft.com>
danmoseley
reviewed
May 15, 2025
danmoseley
approved these changes
May 15, 2025
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The combined error message and stdout were being truncated, which meant that the former would not show, like:
Also: