com um clique
run-tests
Run Embody's test suite and write new tests (Embody development)
Menu
Run Embody's test suite and write new tests (Embody development)
MUST READ before first MCP tool call in a session. Complete Envoy tool catalog with parameters and usage.
MUST READ before calling create_op. Contains required verification, positioning, and error-checking steps.
MUST READ before writing TD Python via execute_python, set_dat_content, or edit_dat_content. API reference for parameters, storage, operators, threading.
Workflow for running multiple TD instances with Envoy, switching between them, and understanding the instance registry.
MUST READ before calling externalize_op or save_externalization. Required workflow steps.
MUST READ before calling create_extension. Required parameters, lifecycle methods, and wiring steps.
| name | run-tests |
| description | Run Embody's test suite and write new tests (Embody development) |
| disable-model-invocation | true |
Embody has 60 test suites covering core externalization, MCP tools, TDN format, and infrastructure.
From TouchDesigner:
op.unit_tests.RunTests() # All tests, one per frame
op.unit_tests.RunTests(suite_name='test_path_utils') # Specific suite
op.unit_tests.RunTests(suite_name='test_path_utils', test_name='test_normalizePath_backslashes_converted')
op.unit_tests.RunTestsSync() # Synchronous (blocks TD)
results = op.unit_tests.GetResults() # Get results dict
Via MCP:
execute_python(code="op.unit_tests.RunTestsSync(); result = op.unit_tests.GetResults()")
Create a test file in dev/embody/unit_tests/:
"""Test suite: description of what this tests."""
class TestMyFeature(EmbodyTestCase):
def test_something(self):
"""Test description."""
op = self.sandbox.create(baseCOMP, 'test_op')
result = self.embody_ext.someMethod(op)
self.assertEqual(result, expected_value)
self.assertTrue(op.valid)
self.assertIn('foo', result)
def setUp(self):
pass
def tearDown(self):
super().tearDown() # Cleans up sandbox
Key objects: self.sandbox (temp baseCOMP), self.embody (op.Embody), self.embody_ext (op.Embody.ext.Embody), self.runner (TestRunnerExt). All TD globals available.
Core (14): externalization, CRUD, file management, tags, rename/move, delete, duplicates, sync, paths, params, queries, logging, custom parameters MCP (11): operators, parameters, DAT content, connections, annotations, extensions, diagnostics, flags/position, code execution, externalization, performance TDN (4): export/import, helpers, reconstruction, file I/O Infrastructure (1): server lifecycle
Always read log files at dev/logs/ — the ring buffer only holds 200 entries. Grep for ERROR and WARNING.