Check 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.
|Modify coverage settings|
|Specify coverage metrics for tests run with MATLAB Unit Test framework|
|Add tests to increase coverage|
|Options for adding test coverage|
- Collect Coverage in Tests
Use coverage measurement to assess the extent of your tests.
- Increase Coverage by Generating Test Inputs
Use Simulink Design Verifier to generate tests that extend coverage and recreate design errors, and add generated tests to your test file.
- Filter Test Execution, Results, and Coverage
Tag tests for selective test execution, and filter results and test coverage.
- Perform Functional Testing and Analyze Test Coverage
Analyze functional dependencies, test model components in isolation, create suites of test cases, test models, and code to achieve coverage.