Skip to content

[tests] Improve NUnit runner reporting and dry-run auditing#11162

Open
simonrozsival wants to merge 2 commits intomainfrom
dev/simonrozsival/nunit-summary-counts
Open

[tests] Improve NUnit runner reporting and dry-run auditing#11162
simonrozsival wants to merge 2 commits intomainfrom
dev/simonrozsival/nunit-summary-counts

Conversation

@simonrozsival
Copy link
Copy Markdown
Member

@simonrozsival simonrozsival commented Apr 20, 2026

Summary

Improve the Android NUnit harness so trimmable and test-lane investigations can audit discovery and exclusions reliably.

Changes

  • fix final Passed/Failed/Skipped summary counts to match NUnit aggregate results
  • add a discovery-only dry-run mode
  • add noexclusions=true to bypass built-in exclusions for auditing
  • surface excluded tests as ignored results with explicit reasons
  • overwrite logcat output per run so stale logs do not masquerade as current crashes

Why

These generic test-runner improvements were useful while working on #11091. I had problems identifying which tests were discovered, but did not run, as passed + skipped + failed < total.

Use NUnit's aggregate TestSuiteResult counts when reporting the final summary so skipped/ignored fixtures are included in the console output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 09:19
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 fixes the Android NUnit harness’ final console summary counts so they match NUnit’s aggregate result tree (and therefore the XML output), addressing undercounting when entire fixtures/suites are ignored.

Changes:

  • Update the runner to refresh Passed/Failed/Skipped/Inconclusive from TestSuiteResult aggregate counts after adding each assembly’s results.
  • Compute ExecutedTests from the aggregate counters to keep the reported totals consistent.

@simonrozsival simonrozsival added the copilot `copilot-cli` or other AIs were used to author this label Apr 20, 2026
Add discovery-only dry runs, a noexclusions switch, explicit skip reasons, and ignored-test visibility for the Android NUnit harness. Also overwrite stale logcat captures so crash diagnosis reflects the current run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival changed the title [tests] Fix NUnit summary counts for ignored tests [tests] Improve NUnit runner reporting and dry-run auditing Apr 20, 2026
simonrozsival added a commit that referenced this pull request Apr 20, 2026
Keep the trimmable typemap PR focused on the CoreCLRTrimmable lane and its targeted test-side plumbing. Move the generic NUnit runner and logcat auditing work to PR #11162, and drop the leftover Preserve-related noise.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot `copilot-cli` or other AIs were used to author this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants