matlab-testing

Generate and execute MATLAB unit tests with matlab.unittest and matlab.uitest.

883|109|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-testing
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/matlab-core/matlab-testing
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents unreliable MATLAB changes by guiding users to generate correct, maintainable unit tests and then run them to catch failures early.

Core Features & Use Cases

  • Create unit and UI tests with the right framework: Generates class-based tests for matlab.unittest and App Designer tests for matlab.uitest.
  • Supports robust test design: Encourages parameterized testing, fixtures, mocking, and determinism practices for repeatable results.
  • Enables validation beyond pass/fail: Performs coverage analysis and supports CI/CD-style execution using buildtool.

Quick Start

Ask the agent to create a MATLAB unit test suite for my function and then run the tests with coverage.

Frequently Asked Questions about matlab-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate and run MATLAB unit tests for my function?

Generate MATLAB unit tests as class-based matlab.unittest suites and execute them through MCP tools like run_matlab_test_file or evaluate_matlab_code to verify function behavior and catch failures early.

Can I use matlab.uitest for App Designer UI testing workflows?

Yes, matlab.uitest generates and executes App Designer UI tests to automate component interactions and validate app behavior, integrating with class-based testing rules for reliable verification.

Does MATLAB testing support coverage analysis for CI/CD pipelines?

MATLAB testing supports coverage analysis and CI/CD-style execution using buildtool, collecting coverage metrics from targeted or full test runs to validate code reliability within automated pipelines.

What is the best way to structure parameterized test suites and mocking in MATLAB?

Structure parameterized test suites and mocking using class-based matlab.unittest, supporting fixtures, mocking, and parameterized testing while enforcing determinism practices for repeatable results.

Why should test methods avoid control flow in MATLAB unit testing?

Test methods must avoid control flow because conditional logic creates unreliable verification paths; class-based testing rules require deterministic execution to ensure parameterized suites and fixtures produce repeatable results.