Batch Coverage Reporting
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 (https://www.mathworks.com/matlabcentral/fileexchange/49858-batch-coverage-reporting), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Verification, Validation, and Test >
- Reporting and Database Access > Simulink Report Generator >
- Reporting and Database Access > MATLAB Report Generator >
- Verification, Validation, and Test > Simulink Coverage > Collect Coverage for Models >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
bacth_coverage/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |