Main Content

Include Model Requirements and Coverage Data in a Web View

You can include these optional views in a model web view:

  • Model requirements (requires Simulink® Requirements™)

  • Model coverage (requires Simulink Coverage™)

Prepare the Model for an Optional Web View

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 Requirements Definition (Simulink Requirements).

  • To add coverage data to a model, simulate the model with coverage enabled. For a web view to include the coverage data, you must also select Save last run in workspace variable in the Coverage > Results pane of the Configuration Parameters dialog box. See Specify Code Coverage Options (Simulink Coverage).

Add Optional Views to a Web View Using the Web View Dialog Box

If you export a model web view from the Simulink Toolstrip, to include requirements or coverage data:

  1. Open the Web View dialog box. In the Simulink Toolstrip, on the Simulation tab, in the File section, click Save . Under Export Model To, select Web View.

  2. Open the Optional Views tab and select the views. By default, both the requirements and coverage views are selected.

  3. 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 an Optional Web View

Open the web view in a web browser. See Display and Navigate a Web View. 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.

See Also

Functions

Related Topics