matlab/matlab-agentic-toolkit / skills-catalog/matlab-software-development/matlab-run-tests
matlab-run-tests
VerifiedRun MATLAB test suites and analyze results, including test filtering, parallel execution, result diagnostics, code coverage collection, gap analysis, and CI/CD with buildtool. Use when running tests, filtering test suites, analyzing test failures, checking, collecting, or analyzing coverage, justifying uncovered code, or configuring CI pipelines. Do NOT use for writing, generating, or structuring tests. Do NOT use for Simulink coverage or Simulink testing workflows.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.3 KB |
| manifest.yaml | config | 472 B |
| references/code-coverage-guidance.md | markdown | 14.6 KB |
| references/datatype-size-extraction.md | markdown | 4.8 KB |
| references/justification-filter-rules.md | markdown | 4.7 KB |
| references/test-execution-guidance.md | markdown | 2.8 KB |
| scripts/printCoverageGaps.m | other | 3.0 KB |
scripts/printCoverageGaps.m
View on GitHubfunction printCoverageGaps(covResults)
%printCoverageGaps Print uncovered items from coverage results.
%
% printCoverageGaps(covResults) prints uncovered items across all metric
% levels present in covResults (CoverageResult output from CodeCoveragePlugin).
%
% Tiers printed depend on the MetricLevel used during collection:
% default (no MetricLevel) — statement & function only
% "decision" — through decision
% "condition" — through condition
% "mcdc" — all
arguments
covResults matlab.coverage.Result
end
% --- statement & function (always available) ---
for type = ["statement", "function"]
[~, decs] = coverageSummary(covResults, type);
items = decs.(type);
uncov = items([items.ExecutionCount] == 0);
for i = 1:numel(uncov)
fprintf('Uncovered %s: %s:%d (%s)\n', type, uncov(i).Filename, ...
uncov(i).SourceLocation.StartLine, uncov(i).FunctionName);
end
end
% --- decision (MetricLevel "decision"+) ---
[~, decs] = coverageSummary(covResults, "decision");
for numFilesWithDecisions = 1:numel(decs)
decisions = decs(numFilesWithDecisions).decision;
for i = 1:numel(decisions)
thisDecision = decisions(i);
outcomes = [thisDecision.Outcome];
for j = 1:numel(outcomes)
if outcomes(j).ExecutionCount == 0
fprintf('Uncovered decision: %s:%d — %s → %s\n', ...
thisDecision.Filename, thisDecision.SourceLocation.StartLine, ...
thisDecision.Text, outcomes(j).Text);
end
end
end
end
% --- condition (MetricLevel "condition"+) ---
[~, decs] = coverageSummary(covResults, "condition");
for numFilesWithConditions = 1:numel(decs)
conditions = decs(numFilesWithConditions).condition;
for i = 1:numel(conditions)
cond = conditions(i);
if cond.TrueCount == 0
fprintf('Uncovered condition (true): %s:%d — %s\n', ...
cond.Filename, cond.SourceLocation.StartLine, cond.Text);
end
if cond.FalseCount == 0
fprintf('Uncovered condition (false): %s:%d — %s\n', ...
cond.Filename, cond.SourceLocation.StartLine, cond.Text);
end
end
end
% --- mcdc (MetricLevel "mcdc") ---
[~, decs] = coverageSummary(covResults, "mcdc");
for i = 1:numel(decs)
d = decs(i).mcdc;
for j = 1:numel(d)
conditions = d(j).Condition;
for k = 1:numel(conditions)
if ~conditions(k).Achieved
fprintf('Unachieved MC/DC: %s:%d — %s → %s\n', ...
d(j).Filename, d(j).SourceLocation.StartLine, ...
d(j).Text, conditions(k).Text);
end
end
end
end
end
% Copyright 2026 The MathWorks, Inc.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |