matlabtest.coder.plugins.GeneratedCodeCoveragePlugin Class
R2026bNamespace: matlabtest.coder.plugins
Superclasses: matlab.unittest.plugins.TestRunnerPlugin, matlab.unittest.plugins.Parallelizable
Plugin for code coverage information for generated C/C++ code equivalence tests
Since R2023a
Description
Add an instance of the matlabtest.coder.plugins.GeneratedCodeCoveragePlugin class to the test runner to collect and
access code coverage information for generated C/C++ code in an equivalence test. When the
test suite runs, the plugin collects information about the parts of the generated C/C++ code
that executed. You can access this information programmatically or in the code coverage
report.
The matlabtest.coder.plugins.GeneratedCodeCoveragePlugin class is a handle class.
Creation
Description
creates a plugin that provides access to code coverage information when you run a
generated C/C++ code equivalence test.p = matlabtest.coder.plugins.GeneratedCodeCoveragePlugin
specifies options using one or more name-value arguments. For example, p = matlabtest.coder.plugins.GeneratedCodeCoveragePlugin(Name=Value)p =
matlabtest.coder.plugins.GeneratedCodeCoveragePlugin(Metrics="decision")
creates a plugin that collects statement, function, and decision coverage metrics.
Name-Value Arguments
Properties
Examples
Limitations
You can only collect coverage for C/C++ equivalence tests on Windows® and Linux® platforms.
You can only collect coverage for equivalence tests that generate C/C++ code for a LIB target.