Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent modal popups during managed and native test runs by enforcing “test mode” assertion behavior, and by ensuring assertion/exception details are visible in console output so CI fails fast and diagnosably.
Changes:
- Add
FW_TEST_MODE=1to managed/native test runners and runsettings to bypass assertion dialog behavior (including registry overrides). - Introduce NUnit assembly-level attributes to suppress assert dialogs and log last-chance exceptions to console for projects that don’t use the shared bootstrap.
- Update native test project includes to build with the DebugProcs dependency and disable assertion dialogs in
testGeneric.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test.ps1 | Sets FW_TEST_MODE for managed test runs outside .runsettings. |
| Test.runsettings | Adds FW_TEST_MODE to test environment variables. |
| Src/InstallValidator/InstallerArtifactsTests/TestAssemblyInfo.cs | Adds assembly-level unhandled-exception logging for installer artifact tests. |
| Src/InstallValidator/InstallerArtifactsTests/InstallerArtifactsTests.csproj | Links AppForTests.config and compiles the logging attribute for tests opting out of shared bootstrap. |
| Src/InstallValidator/InstallValidatorTests/TestAssemblyInfo.cs | Adds assembly-level unhandled-exception logging for installer validator tests. |
| Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.csproj | Compiles the logging attribute for tests opting out of shared bootstrap. |
| Src/Generic/Test/testGeneric.cpp | Disables native assert dialogs during global test setup. |
| Src/Generic/Test/TestGeneric.vcxproj | Fixes include paths for DebugProcs dependency. |
| Src/DebugProcs/DebugProcs.cpp | Adds FW_TEST_MODE override for assert-dialog behavior; mirrors asserts to stderr. |
| Src/Common/FwUtils/FwUtilsTests/Attributes/SuppressAssertDialogsAttribute.cs | New NUnit attribute to suppress assert UI and mirror trace/assert output to console. |
| Src/Common/FwUtils/FwUtilsTests/Attributes/LogUnhandledExceptionsAttribute.cs | New NUnit attribute to log last-chance exceptions to console. |
| Src/Common/FwUtils/FwUtilsTests/Attributes/HandleApplicationThreadExceptionAttribute.cs | Writes WinForms thread exceptions to console before rethrowing. |
| Src/AssemblyInfoForUiIndependentTests.cs | Enables last-chance exception logging for UI-independent test assemblies. |
| Src/AssemblyInfoForTests.cs | Enables last-chance exception logging and assert-dialog suppression for most test assemblies. |
| Src/AppForTests.config | Adds ConsoleTraceListener to mirror trace output to console. |
| Build/scripts/Invoke-CppTest.ps1 | Sets FW_TEST_MODE for native test runner execution. |
Src/Common/FwUtils/FwUtilsTests/Attributes/SuppressAssertDialogsAttribute.cs
Outdated
Show resolved
Hide resolved
Src/Common/FwUtils/FwUtilsTests/Attributes/SuppressAssertDialogsAttribute.cs
Outdated
Show resolved
Hide resolved
Src/Common/FwUtils/FwUtilsTests/Attributes/LogUnhandledExceptionsAttribute.cs
Outdated
Show resolved
Hide resolved
Src/Common/FwUtils/FwUtilsTests/Attributes/SuppressAssertDialogsAttribute.cs
Show resolved
Hide resolved
917324f to
88c7070
Compare
Contributor
Author
|
This fix changes Why this was needed:
What this change does instead:
That preserves the original goals:
Also added focused tests in |
Contributor
Author
|
Follow-up review fixes are now in What changed:
Validation run:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Validation
./build.ps1./test.ps1./test.ps1 -NativeNotes
testGenericLib.exeandTestViews.exeThis change is