[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
IAsyncLifetime
in theCommandTestsBase
class, allowing for better logging of informational messages from the MCP server. This involves moving initialization logic fromLiveTestFixture
toCommandTestsBase
, updating the MCP server to log to stderr, and ensuring that all logs are captured and displayed in the test output.EXISTING:
LiveTestFixture
for setup, which is not optimal for logging.ClientToolTests
class implements its ownIAsyncLifetime
instead of inheriting from a base class.PENDING:
IAsyncLifetime
inCommandTestsBase
.InitializeAsync
method fromLiveTestFixture
toCommandTestsBase
.ClientToolTests
to inherit fromCommandTestsBase
.LiveTestFixture.cs
.CODE STATE:
IAsyncLifetime
and handle stderr logging.CommandTestsBase
and utilize its logging capabilities.CommandTestsBase
.RELEVANT CODE/DOCUMENTATION SNIPPETS:
OTHER NOTES:
-debug
option to the server start command to control logging verbosity.