-
Notifications
You must be signed in to change notification settings - Fork 155
Clarify how to capture logs from tests in .NET Aspire documentation #4252
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
base: main
Are you sure you want to change the base?
Conversation
…t frameworks Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
This PR addresses the missing information about capturing logs from .NET Aspire tests by adding comprehensive documentation and code examples.
Changes Made
Enhanced Documentation
docs/testing/write-your-first-test.md
AddLogging
method on the service collectionappsettings.json
isn't replicated in test projectsCode Examples
LoggingTest.cs
examples for xUnit, NUnit, and MSTest frameworksMicrosoft.Extensions.Logging.Console
IntegrationTest1.cs
comment to reference the new logging guidanceKey Technical Details Covered
builder.Services.AddLogging()
The solution provides clear, actionable guidance that makes it much easier for developers to capture and view logs during .NET Aspire test execution, addressing the confusion mentioned in the original issue.
Fixes #2096.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
aka.ms
curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews