-
Notifications
You must be signed in to change notification settings - Fork 745
Remove exception message assertion from PerTestFrameworkTemplatesTests #12444
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
Conversation
Co-authored-by: mitchdenny <[email protected]>
The new test runners (MSTest with EnableMSTestRunner, xUnit v3, NUnit 4) don't output full exception details to console by default. Remove the assertion checking for the specific exception message and only verify that the test fails with the correct exit code and summary. Co-authored-by: mitchdenny <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12444Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12444" |
|
@DamianEdwards looks like the test run output format changed with the .NET 10 / test runner update and that is why these tests have been failing in the outer loop. |
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.
Pull Request Overview
This PR fixes failing outerloop tests by removing an assertion that checked for exception message details in test output. The three test framework variants (MSTest, xUnit v3, NUnit 4) no longer emit full exception details to console by default with their new test runners, causing the pattern match to fail.
Key changes:
- Removed exception message assertion from
TemplatesForIndividualTestFrameworkstest method - Retained exit code and test summary validations to ensure test behavior is still properly verified
#12444) * Initial plan * Add --diagnostic flag to test command for better error output Co-authored-by: mitchdenny <[email protected]> * Remove exception message assertion from PerTestFrameworkTemplatesTests The new test runners (MSTest with EnableMSTestRunner, xUnit v3, NUnit 4) don't output full exception details to console by default. Remove the assertion checking for the specific exception message and only verify that the test fails with the correct exit code and summary. Co-authored-by: mitchdenny <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mitchdenny <[email protected]>
Three outerloop tests were failing because they expected a specific exception message pattern (
System.ArgumentException.*Resource 'webfrontend' not found.) indotnet testconsole output. The new test runners (MSTest withEnableMSTestRunner, xUnit v3, NUnit 4) no longer output full exception details to console by default—they only show test summaries.Changes
PerTestFrameworkTemplatesTests.csvar res = await cmd.ExecuteAsync($"test -c {config}"); Assert.True(res.ExitCode != 0, $"Expected the tests project run to fail"); - Assert.Matches("System.ArgumentException.*Resource 'webfrontend' not found.", res.Output); Assert.Matches("Failed! * - Failed: *1, Passed: *0, Skipped: *0, Total: *1", res.Output);Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.