[WIP] Enhancing MCP Client Logging in Live Tests #1
+62
−11
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.
Coding agent has begun work on Enhancing MCP Client Logging in Live Tests and will replace this description as work progresses.
See problem context
TITLE: Enhancing MCP Client Logging in Live Tests
USER INTENT: The user aims to improve the logging mechanism for the MCP client in live tests by redirecting the MCP server's stderr output to XUnit's test output helper.
TASK DESCRIPTION: The user wants to refactor the existing test structure to utilize
IAsyncLifetimein theCommandTestsBaseclass, allowing for better logging of informational messages from the MCP server. This involves moving initialization logic fromLiveTestFixturetoCommandTestsBase, updating the MCP server to log to stderr, and ensuring that all logs are captured and displayed in the test output.EXISTING:
LiveTestFixturefor setup, which is not optimal for logging.ClientToolTestsclass implements its ownIAsyncLifetimeinstead of inheriting from a base class.PENDING:
IAsyncLifetimeinCommandTestsBase.InitializeAsyncmethod fromLiveTestFixturetoCommandTestsBase.ClientToolTeststo inherit fromCommandTestsBase.LiveTestFixture.cs.CODE STATE:
IAsyncLifetimeand handle stderr logging.CommandTestsBaseand utilize its logging capabilities.CommandTestsBase.RELEVANT CODE/DOCUMENTATION SNIPPETS:
OTHER NOTES:
-debugoption to the server start command to control logging verbosity.