Main Content

Check Test Coverage

Implement, evaluate, and increase test coverage

Test coverage is how completely the model and generated code are tested. If you have Simulink® Coverage™, you can evaluate your test coverage by using test cases and test suites to exercise model components that correspond to the design requirements. If you have Requirements Toolbox™, you can trace coverage to specific requirements, and you can resolve coverage issues by explicitly excluding some requirements from needing tests. If you have Simulink Design Verifier™, you can create additional test inputs to exercise more of the model components.


sltest.testmanager.CoverageSettingsModify coverage settings
sltest.plugins.coverage.CoverageMetricsSpecify coverage metrics for tests run with MATLAB Unit Test framework
sltest.testmanager.addTestsForMissingCoverageAdd tests to increase coverage
sltest.testmanager.TestOptionsOptions for adding test coverage