Video length is 2:17

What Is MATLAB Test?

MATLAB Test™ provides tools for developing, executing, measuring, and managing dynamic tests of MATLAB® code, including deployed applications and user-authored toolboxes. MATLAB Test offers four new capabilities for MATLAB developers: test management, advanced code coverage, equivalence testing, and a quality dashboard. You can use the project-based quality dashboard to raise the visibility of code readiness to an intuitive summary level. The dashboard is an interactive, graphical summary of code quality metrics with clickable details for code analysis, code coverage, test results, and requirements. The test manager allows you to organize and manage tests by grouping, saving, and running custom test suites via user-specified tags or test selectors. It enables you to view all your project test results in one place. The test results are persistent across MATLAB sessions, so you do not have to rerun all the tests every time you revisit the project. Instead, you can focus on a subset of tests required to verify your current code edits. Using a “depends-on” test selector, you can narrow down the set of tests required to verify a specific source file or folder. MATLAB Test also offers advanced coverage metrics such as condition, decision, and modified condition/decision coverage metrics, on top of statement and function coverage already offered in MATLAB. You can identify untested code paths using industry-standard code coverage metrics, such as condition, decision, and modified condition/decision coverage (MC/DC). Equivalence testing is a technique that ensures the integrity of any code transformed from MATLAB using products such as MATLAB Coder™, Embedded Coder®, or MATLAB Compiler SDK™. For instance, you can verify that the Python® code generated using MATLAB Compiler SDK produces the same output as the original MATLAB code.

Similarly, you could verify the equivalence of C++ code generated into a LIB target and even get the code coverage for the generated code. MATLAB Test enables you to meet specifications in regulated applications by tracing requirements (with Requirements Toolbox™). Support for industry standards is available with IEC Certification Kit (for ISO® 26262, IEC 61508, and IEC 62304). For performance optimization, you can reduce the test execution time of large test suites by leveraging dependency-based test selection, by running tests in parallel, or within continuous integration systems.

Published: 28 Feb 2023

Related Products