What Is MATLAB Test? - MATLAB & Simulink
Video Player is loading.
Current Time 0:00
Duration 2:17
Loaded: 7.22%
Stream Type LIVE
Remaining Time 2:17
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    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

    MATLAB Test helps you develop, manage, analyze, and test MATLAB applications. MATLAB Test offers four new key capabilities for MATLAB developers, a code Quality Dashboard, a MATLAB Test Manager, advanced Code Coverage, and Equivalence Testing. The MATLAB Test Manager allows you to view all your tests and test results for your project in one place. You can organize and manage tests by grouping, saving, and running custom test suites via test tags or test selectors.

    For instance, the DependsOn test selector helps you run targeted tests to verify a specific source file or folder. The test results are persistent across MATLAB sessions, so you don't 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 MATLAB Test also offers advanced coverage metrics, such as condition, decision, and modified condition decision coverage on top of statement and function coverage already offered in MATLAB.

    The Code Coverage Report provides you detailed information regarding each coverage metric. Equivalence Testing, also referred to as back to back testing is a technique used to ensure integrity of any code transform from MATLAB using products such as MATLAB Coder, Embedded Coder, or MATLAB Compiler SDK. For, instance you can verify that Python code generated using MATLAB Compiler SDK is producing the same output as the original MATLAB. Code or you could verify equivalence of C++ code generated by MATLAB Coder and even get a code coverage report for the generated C++ code.

    Bringing this all together is the Code Quality Dashboard, which is an overall graphical view of code quality metrics that help you determine the health of your project. The metrics include static code analysis, MATLAB code coverage, test results, and requirements linked using the Requirements Toolbox. Explore the links below to learn more about MATLAB Test.

    Related Products