matlab-test-creator
MATLAB Test Generator
Generate robust unit tests using the MATLAB Testing Framework. This skill covers:
- Test Creation: Writing test classes, methods, fixtures, assertions, and mocks
Must-Follow Rules
- Present a test plan if needed - Create a user-approved test plan before writing test code unless the scope is limited and straightforward.
- Show diff before updating - For existing test files, always show the user a diff and wait for approval before editing.
- Always use class-based tests - Every test file must define a class inheriting from
matlab.unittest.TestCase. Never use function-based or script-based tests. - Do not guess requirements - If scope or expected behaviors are unclear, ask
Test Creation
Test Class Template
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.
124matlab-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-execution
Run MATLAB tests, analyze results, collect code coverage, and set up CI/CD pipelines. Use when executing tests, filtering test suites, debugging test failures, generating coverage reports, or configuring buildtool and CI systems for MATLAB projects.
20matlab-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