Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Description

Adds --show-all-tests command line option to GenerateTestSummary that outputs all tests in a single markdown list ordered by full test name:

  • ❌ Failing tests: Expanded details with error info (existing format)
  • ✅ Passing tests: Test name only
  • ⏭️ Skipped tests: Test name only

The --show-all-tests option can be used with --combined to include an "All Test Results" section in the combined summary report.

Changes

Program.cs

  • New --show-all-tests (-a) option
  • Can be combined with --combined to show all tests in combined reports

TestSummaryGenerator.cs

  • Modified CreateSingleTestSummaryReport() to accept bool showAllTests = false parameter
  • Modified CreateCombinedTestSummaryReport() to accept bool showAllTests = false parameter
  • Added GenerateAllTestsSection() method to generate all test results for combined reports
  • Added AppendFailedTestDetails() helper method to reduce code duplication

Workflows

  • specialized-test-runner.yml: New showOnlyFailedTestsInSummary input (defaults to true)
    • When false, passes --show-all-tests along with --combined
  • tests-quarantine.yml / tests-outerloop.yml: Set showOnlyFailedTestsInSummary: false to show all tests

Example output (with --combined --show-all-tests)

# Test Summary

## Overall Summary
| Passed | Failed | Skipped | Total |
...

## All Test Results

- ✅ Aspire.Test.AnotherPassingTest
<details><summary>❌ <b>Aspire.Test.FailingTest</b></summary>
...error details...
</details>
- ✅ Aspire.Test.PassingTest1
- ⏭️ Aspire.Test.SkippedTest

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Original prompt

Update tools/GenerateTestSummary/Program.cs:

  • Add a new command line argument: --show-all-tests.
  • By default (when --show-all-tests is not present), only failing tests are included in the summary output.
  • When --show-all-tests is provided, the summary should be a single markdown list, ordered by full name of the test.
  • Each test gets one line:
    • Failing tests: Expanded details (as current), marked with a ❌ red cross.
    • Passing tests: Only full test name, with a ✅ green check.
    • Skipped tests: Only full test name, with a ⏭️ skip emoji.

Update .github/workflows/tests-quarantine.yml and .github/workflows/tests-outerloop.yml:

  • Ensure GenerateTestSummary is invoked with --show-all-tests for both workflows.

Emoji summary:

  • Failing: ❌
  • Passing: ✅
  • Skipped: ⏭️

All test result entries should appear in a single list, ordered by full name.

Reference code links for affected files:

See chat for requirements and clarifications.

This pull request was created as a result of the following prompt from Copilot chat.

Update tools/GenerateTestSummary/Program.cs:

  • Add a new command line argument: --show-all-tests.
  • By default (when --show-all-tests is not present), only failing tests are included in the summary output.
  • When --show-all-tests is provided, the summary should be a single markdown list, ordered by full name of the test.
  • Each test gets one line:
    • Failing tests: Expanded details (as current), marked with a ❌ red cross.
    • Passing tests: Only full test name, with a ✅ green check.
    • Skipped tests: Only full test name, with a ⏭️ skip emoji.

Update .github/workflows/tests-quarantine.yml and .github/workflows/tests-outerloop.yml:

  • Ensure GenerateTestSummary is invoked with --show-all-tests for both workflows.

Emoji summary:

  • Failing: ❌
  • Passing: ✅
  • Skipped: ⏭️

All test result entries should appear in a single list, ordered by full name.

Reference code links for affected files:

See chat for requirements and clarifications.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13341

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13341"

Copilot AI changed the title [WIP] Add --show-all-tests command line argument for test summary Add --show-all-tests option to GenerateTestSummary tool Dec 5, 2025
Copilot AI requested a review from radical December 5, 2025 01:48
Copilot finished work on behalf of radical December 5, 2025 01:48
return overallTableBuilder.ToString();
}

public static string CreateAllTestsSummaryReport(string basePath)
Copy link
Member

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

Copy link
Contributor Author

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)

Copilot AI requested a review from radical December 5, 2025 02:02
Copilot finished work on behalf of radical December 5, 2025 02:02
--
${{ github.workspace }}/testresults
--combined
${{ inputs.extraSummaryArgs || '--combined' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot instead of this:

  1. let's add a new template parameter:
  • showOnlyFailedTestsInSummary defaulting to true
  • And if that is false then it should pass --show-all-tests as extraSummaryArgs to run-tests.yml
  • Also, if it is false then it we should be passing --show-all-tests in addition to --combined
  1. In the test summary generator support show-all-tests for the combined summary too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented as requested:

  1. Added showOnlyFailedTestsInSummary parameter (default true) to specialized-test-runner.yml
  2. When showOnlyFailedTestsInSummary is false, passes --show-all-tests along with --combined
  3. Updated CreateCombinedTestSummaryReport to accept showAllTests parameter and added GenerateAllTestsSection method
  4. Updated both workflows to use showOnlyFailedTestsInSummary: false

(e6d1420)

Copilot AI requested a review from radical December 5, 2025 02:19
Copilot finished work on behalf of radical December 5, 2025 02:19
@radical radical closed this Dec 5, 2025
@radical radical reopened this Dec 5, 2025
@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants