unity-mcp/TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools
dsarno 711768d064
Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507)
* Add editor readiness v2, refresh tool, and preflight guards

* Detect external package changes and harden refresh retry

* feat: add TestRunnerNoThrottle and async test running with background stall prevention

- Add TestRunnerNoThrottle.cs: Sets editor to 'No Throttling' mode during test runs
  with SessionState persistence across domain reload
- Add run_tests_async and get_test_job tools for non-blocking test execution
- Add TestJobManager for async test job tracking with progress monitoring
- Add ForceSynchronousImport to all AssetDatabase.Refresh() calls to prevent stalls
- Mark DomainReloadResilienceTests as [Explicit] with documentation explaining
  the test infrastructure limitation (internal coroutine waits vs MCP socket polling)
- MCP workflow is unaffected - socket messages provide external stimulus that
  keeps Unity responsive even when backgrounded

* refactor: simplify and clean up code

- Remove unused Newtonsoft.Json.Linq import from TestJobManager
- Add throttling to SessionState persistence (once per second) to reduce overhead
- Critical job state changes (start/finish) still persist immediately
- Fix duplicate XML summary tag in DomainReloadResilienceTests

* docs: add async test tools to README, document domain reload limitation

- Add run_tests_async and get_test_job to main README tools list
- Document background stall limitation for domain reload tests in DEV readme

* ci: add separate job for domain reload tests

Run [Explicit] domain_reload tests in their own job using -testCategory

* ci: run domain reload tests in same job as regular tests

Combines into single job with two test steps to reuse cached Library

* fix: address coderabbit review issues

- Fix TOCTOU race in TestJobManager.StartJob (single lock scope for check-and-set)
- Store TestRunnerApi reference with HideAndDontSave to prevent GC/serialization issues

* docs: update tool descriptions to prefer run_tests_async

- run_tests_async is now marked as preferred for long-running suites
- run_tests description notes it blocks and suggests async alternative

* docs: update README screenshot to v8.6 UI

* docs: add v8.6 UI screenshot

* Update README for MCP version and instructions for v8.7

* fix: handle preflight busy signals and derive job status from test results

- manage_asset, manage_gameobject, manage_scene now check preflight return
  value and propagate busy/retry signals to clients (fixes Sourcery #1)
- TestJobManager.FinalizeCurrentJobFromRunFinished now sets job status to
  Failed when resultPayload.Failed > 0, not always Succeeded (fixes Sourcery #2)

* fix: increase HTTP server startup timeout for dev mode

When 'Force fresh server install' is enabled, uvx uses --no-cache --refresh
which rebuilds the package and takes significantly longer to start.

- Increase timeout from 10s to 45s when dev mode is enabled
- Add informative log message explaining the longer startup time
- Show actual timeout value in warning message

* fix: derive job status from test results in FinalizeFromTask fallback

Apply same logic as FinalizeCurrentJobFromRunFinished: check result.Failed > 0
to correctly mark jobs as Failed when tests fail, even in the fallback path
when RunFinished callback is not delivered.
2026-01-03 12:42:32 -08:00
..
Fixtures feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
AIPropertyMatchingTests.cs Move Get commands to editor resources + Run Python tests every update (#368) 2025-11-05 16:06:48 -04:00
AIPropertyMatchingTests.cs.meta Allow the LLMs to read menu items, not just execute them (#263) 2025-09-12 11:19:58 -04:00
CommandRegistryTests.cs Move Get commands to editor resources + Run Python tests every update (#368) 2025-11-05 16:06:48 -04:00
CommandRegistryTests.cs.meta Improve Windsurf MCP Config (#231) 2025-08-24 06:57:11 -04:00
ComponentResolverTests.cs Move Get commands to editor resources + Run Python tests every update (#368) 2025-11-05 16:06:48 -04:00
ComponentResolverTests.cs.meta Allow the LLMs to read menu items, not just execute them (#263) 2025-09-12 11:19:58 -04:00
DomainReloadResilienceTests.cs Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
DomainReloadResilienceTests.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
ExecuteMenuItemTests.cs Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
ExecuteMenuItemTests.cs.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
Fixtures.meta feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
MCPToolParameterTests.cs Feature/run tests summary clean (#501) 2026-01-01 20:36:45 -08:00
MCPToolParameterTests.cs.meta Feature/run tests summary clean (#501) 2026-01-01 20:36:45 -08:00
ManageGameObjectTests.cs ManageGameObject/Material + auto-select sole Unity instance (#502) 2026-01-01 21:04:10 -08:00
ManageGameObjectTests.cs.meta Allow the LLMs to read menu items, not just execute them (#263) 2025-09-12 11:19:58 -04:00
ManageMaterialPropertiesTests.cs feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialPropertiesTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialReproTests.cs feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialReproTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialStressTests.cs feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialStressTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialTests.cs feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManageMaterialTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ManagePrefabsTests.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
ManagePrefabsTests.cs.meta Open and close prefabs in the stage view + create them (#283) 2025-09-26 19:28:56 -04:00
ManageSceneHierarchyPagingTests.cs Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
ManageSceneHierarchyPagingTests.cs.meta Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
ManageScriptValidationTests.cs Autoformat (#297) 2025-09-30 16:25:33 -04:00
ManageScriptValidationTests.cs.meta fix: address CodeRabbit and Greptile feedback 2025-09-03 16:37:45 -07:00
ManageScriptableObjectTests.cs Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
ManageScriptableObjectTests.cs.meta feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
MaterialDirectPropertiesTests.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MaterialDirectPropertiesTests.cs.meta Material tools: support direct shader property keys + add EditMode coverage (#344) 2025-10-23 18:25:29 -07:00
MaterialMeshInstantiationTests.cs Move Get commands to editor resources + Run Python tests every update (#368) 2025-11-05 16:06:48 -04:00
MaterialMeshInstantiationTests.cs.meta test: Consolidate pytest suite to MCPForUnity and improve test infrastructure (#332) 2025-10-21 10:42:55 -07:00
MaterialParameterToolTests.cs feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
MaterialParameterToolTests.cs.meta Harden MCP tool parameter handling + add material workflow tests (TDD) (#343) 2025-10-23 17:57:27 -07:00
ReadConsoleTests.cs feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
ReadConsoleTests.cs.meta feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
RunTestsTests.cs Feature/run tests summary clean (#501) 2026-01-01 20:36:45 -08:00
RunTestsTests.cs.meta Feature/run tests summary clean (#501) 2026-01-01 20:36:45 -08:00