Using Simulink    

Model Coverage Commands

cvhtml

Produce an HTML report of cvdata object(s).

Create an HTML report of the coverage results in the cvdata object data. The report will be written to file.

Create a combined report of several data objects. The results from each object will be displayed in a separate column. Each data object must correspond to the same root subsystem or the function will produce errors.

Specify the detail level of the report with the value of detail, an integer between 0 and 3. Greater numbers indicate greater detail. The default value is 2.

cvload

Load coverage tests and results from file.

Load the tests and data stored in the text file FILENAME.CVT. The tests that are successfully loaded are returned in TESTS, a cell array of cvtest objects. DATA is a cell array of cvdata objects that were successfully loaded. DATA has the same size as TESTS but may contain empty elements if a particular test has no results.

Special considerations:

cvreport

Report the information in a cvdata object. This command has the following forms.

Create a text report of the coverage results in the cvdata object data. The report will be written to file. If file is empty the report will be displayed at the command prompt.

Create a combined report of several test objects. The results from each object will be displayed in a separate column. Each data object must correspond to the same root subsystem or the function will produce errors.

Specify the detail level of the report with the value of detail, an integer between 0 and 3. Greater numbers indicate greater detail. The default value is 2.

cvsave

Save coverage tests and results to file.

Save all the tests and results related to model in the text file filename.cvt.

Save the specified tests in the text file filename.cvt. Information about the referenced model(s) is also saved.

Save the specified data objects, the tests that created them, and the referenced model(s) structure in the text file filename.cvt.

cvsim

Run a test case.

This command can take the following forms.

Execute the cvtest object test by starting a simulation run for the corresponding model. The results are returned in a cvdata object.

Returns the simulation time vector, t, state values, x, and output values, y.

[data,t,x,y] = cvsim( test, timespan, options)

Override the default simulation values. For more information see the sim command.

[data1, data2, ...] = cvsim( test1, test2, ... )

Execute a set of tests and return the results in cvdata objects.

Create and execute a cvtest object.

cvtest

Creates a test case. This command has the following syntax.

where root is the name or handle to the model or subsystem to be tested, label is a string that identifies the test case, and setupcmd is a MATLAB command that cvsim executes in the base workspace before running the instrumented model. The second two arguments are optional. The cvtest command returns a handle to the registered test case.


 Coverage Settings Dialog Box Model and Block Parameters