[status, cvdo, filenames, newmodel]
= sldvgencov(block, options, showUI, startCov)
analyzes the block by using the
sldvoptions object options. The
software returns a handle to the newmodel, which contains a
copy of the block subsystem.
Analyze the coverage data and collect the missing coverage
data.
Analyze the Cruise Control model and simulate a version of that model by
using data from test cases from the previous analysis. Compare the model
coverage data and collect the coverage missing from the
sldvdemo_cruise_control_mod model analysis:
opts = sldvoptions;
% Generate test cases
opts.Mode = 'TestGeneration';
% Specify MCDC coverage
opts.ModelCoverageObjectives = 'MCDC';
% Don't create harness model
opts.SaveHarnessModel = 'off';
% or report
opts.SaveReport = 'off';
openExample('sldv/ExtendTestCasesForModifiedModelExample',...'supportingFile', 'sldvdemo_cruise_control');
[ status, files ] = sldvrun('sldvdemo_cruise_control', opts);
open_system 'sldvdemo_cruise_control_mod';
[ outData, startCov ] = sldvruntest('sldvdemo_cruise_control_mod',...
files.DataFile, [], true);
cvhtml('Coverage with the original test suite', startCov);
[ status, covData, files ] = sldvgencov('sldvdemo_cruise_control_mod',...
opts, false, startCov);
cvdata object containing coverage data for new
tests.
A structure whose fields list the file names resulting from the
analysis.
DataFile
MAT-file with the raw input data.
HarnessModel
Simulink harness model.
Report
HTML report of the results.
ExtractedModel
Simulink model extracted from the
subsystem.
BlockReplacementModel
Simulink model obtained after block
replacements.
Logical value that indicates if the analysis collected model
coverage.
true for analysis collected model coverage
data.
false if analysis does not collect model coverage
data.
If the API is invoked with block, then the software
returns the handle to the new model in newmodel which
contains a copy of the atomic subsystem block.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.