-
Notifications
You must be signed in to change notification settings - Fork 745
Add --show-all-tests option to GenerateTestSummary tool #13341
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: radical <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13341Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13341" |
| return overallTableBuilder.ToString(); | ||
| } | ||
|
|
||
| public static string CreateAllTestsSummaryReport(string basePath) |
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.
@copilot This is not correct. Modify CreateSingleTestSummaryReport:
- this will take an additional parameter like
onlyFailedTests = true - The method can then iterate over all the test results, and depending on the param it can show either only the failed ones or all the tests
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.
Refactored as requested. Modified CreateSingleTestSummaryReport to accept bool showAllTests = false parameter and removed the separate CreateAllTestsSummaryReport method. The method now iterates over all test results when showAllTests is true, otherwise only shows failed tests. (850046d)
… instead of separate method Co-authored-by: radical <[email protected]>
| -- | ||
| ${{ github.workspace }}/testresults | ||
| --combined | ||
| ${{ inputs.extraSummaryArgs || '--combined' }} |
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.
@copilot instead of this:
- let's add a new template parameter:
showOnlyFailedTestsInSummarydefaulting totrue- And if that is false then it should pass
--show-all-testsasextraSummaryArgstorun-tests.yml - Also, if it is false then it we should be passing
--show-all-testsin addition to--combined
- In the test summary generator support show-all-tests for the combined summary too.
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.
Implemented as requested:
- Added
showOnlyFailedTestsInSummaryparameter (defaulttrue) tospecialized-test-runner.yml - When
showOnlyFailedTestsInSummaryisfalse, passes--show-all-testsalong with--combined - Updated
CreateCombinedTestSummaryReportto acceptshowAllTestsparameter and addedGenerateAllTestsSectionmethod - Updated both workflows to use
showOnlyFailedTestsInSummary: false
(e6d1420)
…ts with --combined Co-authored-by: radical <[email protected]>
Description
Adds
--show-all-testscommand line option to GenerateTestSummary that outputs all tests in a single markdown list ordered by full test name:The
--show-all-testsoption can be used with--combinedto include an "All Test Results" section in the combined summary report.Changes
Program.cs
--show-all-tests(-a) option--combinedto show all tests in combined reportsTestSummaryGenerator.cs
CreateSingleTestSummaryReport()to acceptbool showAllTests = falseparameterCreateCombinedTestSummaryReport()to acceptbool showAllTests = falseparameterGenerateAllTestsSection()method to generate all test results for combined reportsAppendFailedTestDetails()helper method to reduce code duplicationWorkflows
specialized-test-runner.yml: NewshowOnlyFailedTestsInSummaryinput (defaults totrue)false, passes--show-all-testsalong with--combinedtests-quarantine.yml/tests-outerloop.yml: SetshowOnlyFailedTestsInSummary: falseto show all testsExample output (with --combined --show-all-tests)
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplateOriginal prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.