matlab-testing
Generate and run MATLAB unit tests using matlab.unittest and matlab.uitest. Parameterized tests, fixtures, mocking, coverage analysis, CI/CD with buildtool, app testing with gestures. Use when creating tests, writing test classes, running test suites, checking coverage, testing apps, or validating MATLAB code.
npx skills add matlab/matlab-agentic-toolkit --skill matlab-testing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Testing Generate, structure, and run MATLAB unit tests using the `matlab.unittest` framework. Covers class-based tests, parameterized testing, fixtures, mocking, coverage analysis, CI/CD integration, and app testing via MCP. ## When to Use - User asks to write tests for a MATLAB function or class - User wants to run an existing test suite - User needs coverage analysis or CI/CD configuration - Test-driven development — writing tests before implementation - Testing App Designer apps with programmatic gestures (see [reference/app-testing-guidance.md](reference/app-testing-guidance.md)) ## When NOT to Use - Testing Simulink models — use Simulink test skills - Performance benchmarking — use profiling workflows ## Must-Follow Rules - **Present a test plan first** — For non-trivial test suites, propose test methods and edge cases for user approval before writing code - **Always use class-based tests** — Every test file must inherit from `matlab.unittest.TestCase`. Never use script-based tests - **No logic in test methods** — No `if`, `switch`, `for`, or `try/catch`. Follow **Arrange-Act-Assert**. If a test needs conditionals, split into separate methods - **Test public interfaces, not
- When to Use
- When NOT to Use
- Must-Follow Rules
- Workflow
- Simple tests (clear behavior, limited scope)
- Standard tests (large codebase, multiple files)
- Key Functions
- Qualification Levels
- Patterns
- Basic Test Class
- Parameterized Tests
- Setup, Teardown, and Fixtures
- Determinism
- Test Tags
What does the matlab-testing skill do?
Generate and run MATLAB unit tests using matlab.unittest and matlab.uitest. Parameterized tests, fixtures, mocking, coverage analysis, CI/CD with buildtool, app testing with gestures. Use when creating tests, writing test classes, running test suites, checking coverage, testing apps, or validating MATLAB code.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
