Include Model Requirements and Coverage Data in Web Views
You can include these optional views in a model web view:
Model requirements (requires Requirements Toolbox™)
Model coverage (requires Simulink® Coverage™)
Prepare Models for Optional Web Views
Before you can include an optional view in a web view, the model must contain requirements or coverage data:
To add requirements to a model, see Author and Validate Requirements (Requirements Toolbox).
To add coverage data to a model, simulate the model with coverage enabled and save the results of the last coverage run. To enable saving the results:
Open the Configuration Parameters window. In the Modeling tab, click Model Settings.
Click Coverage.
Select Enable coverage analysis.
In the Results section, select Save last run in workspace variable.
For more information, see Specify Code Coverage Options (Simulink Coverage).
Add Optional Views to Web Views Using Web View Window
If you export a model web view from the Simulink Toolstrip, to include requirements or coverage data:
Open the Web View window. In the Simulink Toolstrip, in the Simulation tab, in the File section, click Save
. Under Export Model
To, select Web View.Open the Optional Views tab and select the views. By default, both the requirements and coverage views are selected.

Click Export.
Add Optional Web Views Using slwebview
If you export a web view by using slwebview, specify the optional views
by using the "OptionalViews" argument. Specify one or both of these
values in a cell array:
"requirements"
"coverage"
For example:
htmlFileName = slwebview(gcs,"OptionalViews", {"requirements" "coverage"});
Open Optional Web Views
Open the web view in a web browser. See Display and Navigate Through Web Views. In the lower-left palette of the web view, there is a button for each optional view that you selected.
To access the requirements view, click the
button. This view highlights model elements
that have requirements and outlines model elements that contain elements that
have requirements.To access the coverage data view, click the
button. Click model elements for coverage
information.
View Requirement and Links in a Web View
You can also create a web view that lists the requirements and links in a separate pane. To create the web view:
In the Apps tab, click Requirements Manager to open the Requirements tab.
Click Share > Export Model to Web View.
You can generate the web view programmatically by calling slwebview_req (Requirements Toolbox).
The web view displays the requirements and links in a pane below the model view. When you select a requirement or link, the Properties pane displays the properties. If the requirement is linked to a model artifact, selecting the requirement highlights the linked model artifact.
For example, if you export the model used in the Link Test Cases to Requirements (Requirements Toolbox) example to a web view, the web view includes this pane.

View Coverage in a Web View
You can also create a web view that lists the coverage information in a separate pane. To create the web view:
In the Apps tab, click Coverage Analyzer to open the Coverage tab.
Click Results Explorer in the toolstrip.
Open Settings from the left navigation tree, select Generate Web View Report, and click Apply.
Select Current Cumulative Data from the left navigation tree.
Click Generate Report in the toolstrip.
For more information on model coverage highlighting and analysis
information, see View Coverage Results (Simulink Coverage). You can
generate the web view programmatically by calling slwebview_cov (Simulink Coverage).
The web view displays the coverage information in a pane below the model view. For example if you export the model used in the Analyzing MCDC for Cascaded Logic Blocks (Simulink Coverage) example to a web view, the web view includes this pane.

See Also
Functions
slwebview|slwebview_req(Requirements Toolbox) |slwebview_cov(Simulink Coverage)