Skip to content

Add -NoCoverage switch and improve crash diagnostics - #548

Merged
AArnott merged 1 commit into
mainfrom
aarnott-test-diagnostics
Aug 10, 2026
Merged

Add -NoCoverage switch and improve crash diagnostics#548
AArnott merged 1 commit into
mainfrom
aarnott-test-diagnostics

Conversation

@AArnott

@AArnott AArnott commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Adds a -NoCoverage switch to dotnet-test-cloud.ps1 for both the MTP and
VSTest code paths. Code coverage instrumentation can destabilize a test
run, and when it does there is currently no way for a repo to keep running
tests on the affected leg without hand-editing this script.

Also collect a crash report alongside the crash dump, and restrict the dump
to the heap. On Linux the native crash report is often the only way to
identify the faulting thread and instruction when a test host dies of an
access violation, and a heap dump is considerably smaller than the default
full dump while still containing everything needed to analyze managed state.

Finally, stop discarding crash dumps that have no TRX attachment copy. The
previous filter kept a .dmp only when it appeared under a TRX 'In'
directory, so on GitHub Actions -- which does not request a TRX report --
every crash dump was dropped from the uploaded artifacts, making test host
crashes impossible to diagnose. The dumps are now de-duplicated by file
name instead, which still avoids uploading the same dump twice on Azure
Pipelines.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Adds a -NoCoverage switch to dotnet-test-cloud.ps1 for both the MTP and
VSTest code paths. Code coverage instrumentation can destabilize a test
run, and when it does there is currently no way for a repo to keep running
tests on the affected leg without hand-editing this script.

Also collect a crash report alongside the crash dump, and restrict the dump
to the heap. On Linux the native crash report is often the only way to
identify the faulting thread and instruction when a test host dies of an
access violation, and a heap dump is considerably smaller than the default
full dump while still containing everything needed to analyze managed state.

Finally, stop discarding crash dumps that have no TRX attachment copy. The
previous filter kept a .dmp only when it appeared under a TRX 'In'
directory, so on GitHub Actions -- which does not request a TRX report --
every crash dump was dropped from the uploaded artifacts, making test host
crashes impossible to diagnose. The dumps are now de-duplicated by file
name instead, which still avoids uploading the same dump twice on Azure
Pipelines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (79bb7f0) to head (652e601).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #548   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            2         2           
=========================================
  Hits             2         2           
Flag Coverage Δ
Linux 50.00% <ø> (ø)
Windows 100.00% <ø> (ø)
macOS 50.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

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 enhances the repository’s cloud-test orchestration scripts to make CI test runs more resilient and diagnosable by allowing coverage to be disabled on demand and by improving crash dump collection/upload behavior.

Changes:

  • Added a -NoCoverage switch to tools/dotnet-test-cloud.ps1 for both Microsoft.Testing.Platform (MTP) and VSTest execution paths.
  • Improved MTP crash diagnostics by collecting a native crash report (when supported) and restricting crash dumps to heap dumps to reduce artifact size.
  • Updated test result artifact selection to avoid dropping crash dumps when no TRX attachment copy exists, while still deduplicating duplicate dumps when TRX attachments are present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tools/dotnet-test-cloud.ps1 Adds -NoCoverage and improves MTP crash dump/report configuration (heap dumps + native crash report).
tools/artifacts/testResults.ps1 Adjusts dump selection to keep non-TRX-attached dumps (e.g., GH Actions), while deduplicating by dump filename when TRX attachments exist.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@AArnott
AArnott merged commit f174c91 into main Aug 10, 2026
11 checks passed
@AArnott
AArnott deleted the aarnott-test-diagnostics branch August 10, 2026 18:37
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