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 Pane
You can also create a web view that lists the requirements and links. To create a web view that organizes the requirements and links in their own section:
Open the Requirements tab. In the Apps tab, click Requirements Manager.
Click Share > Export Model to Web View.
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.
See Also
Functions
Related Topics
- Export Models to Web View Files
- Display and Navigate Through Web Views
- Requirements Toolbox Product Description (Requirements Toolbox)
- Model Coverage (Simulink Coverage)