testing-mcp

v0.6.0
testing-mcp Checked 3 days ago Published 1 month ago

An MCP server enabling LLMs to write integration tests through live test environment interaction

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_current_test_state

Get the current state of a connected test, including DOM, snapshot, console logs, and available context APIs. The response includes 'availableContext' field which lists all APIs/variables that can be used in execute_test_step.

ParameterTypeDescription
testFilestringOptional: specific test file path
testNamestringOptional: specific test name

finalize_test

Finalize the test by removing connect() call and optionally cleaning up markers

ParameterTypeDescription
testFile *stringPath to the test file
removeMarkersbooleanWhether to remove TESTING-MCP markers (default: true)

list_active_tests

List all currently connected test processes

get_generated_code

Get all generated code blocks from a test file

ParameterTypeDescription
testFile *stringPath to the test file

execute_test_step

Execute code directly in the connected test client and get back the updated DOM state and console logs. IMPORTANT: Before using this tool, call get_current_test_state first to check the 'availableContext' field, which lists all available APIs/variables you can use in your code.

ParameterTypeDescription
code *stringThe JavaScript/TypeScript code to execute in the test environment. You can use any APIs/variables listed in the 'availableContext' field from get_current_test_state (e.g., screen, fireEvent, waitFor,…
testFilestringOptional: specific test file (uses current if not provided)
testNamestringOptional: specific test name (uses current if not provided)