What problem does it solve?
Writing correct, maintainable MATLAB tests requires deep knowledge of the matlab.unittest framework, and AI agents often produce script-based tests, miss edge cases, or use incorrect assertion patterns. This Skill provides the conventions, patterns, and execution workflow to generate class-based tests, run them via MCP tools, and measure coverage.
Core Features & Use Cases
- Class-Based Test Generation: Creates test classes inheriting from matlab.unittest.TestCase with parameterized tests, fixtures, tags, and Arrange-Act-Assert structure.
- Coverage and CI/CD: Runs tests with CodeCoveragePlugin, identifies coverage gaps, and configures buildtool pipelines for GitHub Actions, Azure DevOps, and GitLab CI.
- App Designer Testing: Tests apps programmatically with matlab.uitest gestures like press, choose, type, and drag, including dialog handling and async callbacks.
- Use Case: Ask the agent to write tests for a computeArea function, and it proposes a test plan, generates a parameterized test class with floating-point tolerances, runs it via the run_matlab_test_file MCP tool, and reports coverage gaps.
Quick Start
Ask the agent to write and run unit tests for your MATLAB function using the matlab-write-test skill.