Batch Coverage Reporting

Report top level coverage on mutiple models though a single script.
Updated 28 Feb 2015

View License

Coverage reports produced in an HTML format do not lend themselves to difference reporting for regression testing. The enclosed script, RunCoverageReport, takes a list of models defined in the BlockNames script, simulates the model and reports in a table format the coverage results (currently decision, condition and MCDC). Since it uses the model coverage settings these results can be for the whole model or a specified block. The script will identify symbolically in the table which models do not have full coverage and tallies at the end the results across all the models. A sample BlockNames and the corresponding script output is included (the models themselves in the report are not included). Because this provides a text result it can simplify regression tests to show coverage has not changed.
Note that coverage analysis is assumed to be turned on and that on the results tab the cummulative results are sent to a workspace cvdata variable. The script will find the name used in the model. The script does not check for these conditions and will fail if they are not met. The HTML reports are also generated while using this script.

Cite As

Dirk Jungquist (2024). Batch Coverage Reporting (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes