To create and run test cases, model coverage provides two MATLAB® commands, cvtest and cvsim. The cvtest command creates test cases that the cvsim command runs. (See Run Tests with cvsim.)
You can also run the coverage tool interactively:
Open the sldemo_fuelsys model.
The Coverage Settings dialog box appears, with the Coverage tab open.
The Select Subsystem button
The metrics options in the Coverage metrics section
Fields on the Results, Reporting, and Options tabs of the Coverage Settings dialog box
If you specify to report model coverage, the Simulink Verification and Validation™ software saves coverage data for the current run in the workspace object covdata and cumulative coverage data in covCumulativeData, by default. At the end of the simulation, this data appears in an HTML report that opens in a browser window.
Note: You cannot run simulations if you select both model coverage reporting and acceleration options. If you select Simulation > Mode > Accelerator in the Simulink Editor, Simulink does not record coverage.
You cannot select both block reduction and conditional branch input optimization when you perform coverage analysis because they interfere with coverage recording.