How to Address Coverage Testing Gaps
After you generate a model coverage report, you can use Simulink® Coverage™ to help you address coverage testing gaps for your model.
Recording and Evaluating Coverage
After you enable coverage recording and simulate your model, you then evaluate the coverage data to find gaps in your testing. Coverage reports and model highlighting help you to understand which parts of your design are sufficiently exercised by your test cases.
For more information, see:
Addressing Coverage Testing Gaps
If your coverage tests do not sufficiently exercise your model, there are a few steps you can take to increase your coverage:
Edit the model — Your model might contain unintended functionality that is not part of your required design. Remove the unintended functionality.
Edit the requirements — Your requirements might not sufficiently detail the testing required to exercise all parts of your design. You can use Requirements Toolbox™ to author and edit requirements from within the Simulink environment. For more information, see Test Model Against Requirements and Report Results.
Create additional tests — Your existing tests might not fully exercise the intended simulation inputs according to your requirements. You can use Simulink Coverage to create additional tests to model these inputs. For more information, see Automating Model Coverage Tasks and Generate Test Cases (Simulink Design Verifier).
Extend existing tests — Your existing tests might not fully exercise all parts of your design. If you have a Simulink Design Verifier™ license, you may be able to automatically generate additional tests to exercise untested parts of your design. For more information, see Generate Tests to Increase Model Coverage.
Justify the results — Parts of your model might not be exercised during simulation according to your design, such as subsystems that only enable during failures. To achieve full coverage in such cases, you can justify the missing coverage. For more information, see Create, Edit, and View Coverage Filter Rules.
Reporting and Archiving Results
If your coverage tests sufficiently exercise your model, you can archive the reported results. For more information, see: