77using System . Collections . Generic ;
88using UnityEditor . TestTools . TestRunner . Api ;
99using McpUnity . Services ;
10+ using McpUnity . Utils ;
1011
1112namespace McpUnity . Tools
1213{
@@ -81,7 +82,7 @@ public override void ExecuteAsync(JObject parameters, TaskCompletionSource<JObje
8182 }
8283
8384 // Log the execution
84- Debug . Log ( $ "[MCP Unity] Running tests: Mode={ testMode } , Filter={ testFilter } ") ;
85+ McpLogger . LogInfo ( $ "[MCP Unity] Running tests: Mode={ testMode } , Filter={ testFilter } ") ;
8586
8687 // Reset state
8788 _isRunning = true ;
@@ -101,7 +102,7 @@ public override void ExecuteAsync(JObject parameters, TaskCompletionSource<JObje
101102 // Called when a test run starts
102103 public void RunStarted ( ITestAdaptor testsToRun )
103104 {
104- Debug . Log ( $ "[MCP Unity] Test run started: { testsToRun . Name } ") ;
105+ McpLogger . LogInfo ( $ "[MCP Unity] Test run started: { testsToRun . Name } ") ;
105106 }
106107
107108 // Called when a test runs
@@ -122,13 +123,13 @@ public void TestFinished(ITestResultAdaptor result)
122123 Duration = result . Duration
123124 } ) ;
124125
125- Debug . Log ( $ "[MCP Unity] Test finished: { result . Test . Name } - { result . ResultState } ") ;
126+ McpLogger . LogInfo ( $ "[MCP Unity] Test finished: { result . Test . Name } - { result . ResultState } ") ;
126127 }
127128
128129 // Called when a test run completes
129130 public void RunFinished ( ITestResultAdaptor result )
130131 {
131- Debug . Log ( $ "[MCP Unity] Test run completed: { result . Test . Name } - { result . ResultState } ") ;
132+ McpLogger . LogInfo ( $ "[MCP Unity] { _testResults . Count } tests completed in { result . Duration } : { result . Test . Name } - { result . ResultState } ") ;
132133
133134 _isRunning = false ;
134135
@@ -170,7 +171,7 @@ public void RunFinished(ITestResultAdaptor result)
170171 }
171172 catch ( Exception ex )
172173 {
173- Debug . LogError ( $ "[MCP Unity] Failed to set test results: { ex . Message } ") ;
174+ McpLogger . LogError ( $ "[MCP Unity] Failed to set test results: { ex . Message } ") ;
174175 _testRunCompletionSource ? . TrySetException ( ex ) ;
175176 }
176177 finally
0 commit comments