matlab-test-execution
MATLAB Test Execution
Must-Follow Rules
- Execute MATLAB via MCP — If the MATLAB MCP core server is available, use its
evaluate_matlab_codetool to run MATLAB commands. Fall back tomatlab -batchonly if the MCP server is not available. - Use buildtool for CI — When running tests in CI/CD, always use
buildtoolwith abuildfile.m. Do not use manualruntestsorTestRunnerscripts in CI. - Do not guess — If the test folder location, source folder, or desired output format is unclear, ask.
Running Tests
results = runtests('tests'); % All tests in a directory
results = runtests('myFunctionTest'); % Specific test file
results = runtests('myFunctionTest/testAddition'); % Specific test method
Filtering
More from matlab/skills
matlab-performance-optimizer
Optimize MATLAB code for better performance through vectorization, memory management, and profiling. Use when user requests optimization, mentions slow code, performance issues, speed improvements, or asks to make code faster or more efficient.
123matlab-live-script
Create MATLAB plain text Live Scripts (.m files) following specific formatting rules. Use when generating MATLAB scripts, educational MATLAB content, Live Scripts, or when the user requests .m files with rich text formatting.
64matlab-digital-filter-design
Designs and validates digital filters in MATLAB. Use when cleaning up noisy signals, removing interference, filtering signals, designing FIR/IIR filters (lowpass/highpass/bandpass/bandstop/notch), or comparing filters in Filter Analyzer.
59matlab-uihtml-app-builder
Build interactive web applications using HTML/JavaScript interfaces with MATLAB computational backends via the uihtml component. Use when creating HTML-based MATLAB apps, JavaScript MATLAB interfaces, web UIs with MATLAB, interactive MATLAB GUIs, or when user mentions uihtml, HTML, JavaScript, web apps, or web interfaces.
46matlab-test-creator
Create comprehensive MATLAB unit tests using the MATLAB Testing Framework. Use when generating test files, test cases, unit tests, or when the user requests testing for MATLAB code, functions, or classes.
23matlab-test-generator
Create comprehensive MATLAB unit tests using the MATLAB Testing Framework. Use when generating test files, test cases, unit tests, test suites, or when the user requests testing for MATLAB code, functions, or classes.
18