Contenuto principale

La traduzione di questa pagina non è aggiornata. Fai clic qui per vedere l'ultima versione in inglese.

Nozioni di base sulla generazione dei test

Creare casi di test per validare il comportamento del modello

Simulink® Design Verifier™ è un potente strumento che consente di migliorare l'affidabilità e la robustezza dei modelli di Simulink attraverso la generazione automatica dei test. La feature Genera test facilita la creazione di casi di test completi volti a individuare errori di progettazione, validare il comportamento del modello e garantire la coverage di tutti i requisiti funzionali. Sfruttando i metodi formali, Simulink Design Verifier esplora sistematicamente lo spazio di stato del modello per identificare scenari di test critici, riducendo così gli sforzi di test manuali e accelerando il processo di verifica. È possibile seguire le fasi fondamentali descritte per generare e utilizzare in modo efficace i casi di test, garantendo che il modello soddisfi i criteri di progettazione specificati e funzioni come previsto.

Blocchi

espandi tutto

Test ConditionConstrain signal values in test cases
Test ObjectiveDefine custom objectives that signals must satisfy in test cases
DetectorDetect true duration on input and construct output true duration based on output type
ExtenderExtend true duration of input
ImpliesSpecify condition that produces a certain response
Within ImpliesVerify response occurs within desired duration
Verification SubsystemSpecify proof or test objectives without impacting simulation results or generated code

Funzioni

espandi tutto

sldvoptionsCreate design verification options object
sldv.conditionTest condition function for Stateflow charts and MATLAB Function blocks
sldv.testTest objective function for Stateflow charts and MATLAB Function blocks
sldvextractExtract subsystem or subchart contents into new model for analysis
sldvtimerIdentify, change, and display timer optimizations
sldvoptionsCreate design verification options object
sldvrunAnalyze model
sldvlogsignalsLog simulation input port values
sldvgencovAnalyze models to obtain missing model coverage
sldvgenspreadsheetGenerate spreadsheet containing test cases (Da R2022b)
sldvruntestSimulate model by using input data
sldvruntestoptsGenerate simulation or execution options for sldvruntest or sldvruncgvtest
sldvharnessoptsDefault options for sldvmakeharness
sldvmakefilterGenerate filter file containing justification rules for objectives with Unsatisfiable, Dead Logic, Falsified, Falsified - No Counterexample, or Error - Needs Simulation status in sldvData file (Da R2022a)
sldvmakeharnessGenerate harness model
sldvmergeharnessMerge test cases and initializations into one harness model
sldvreportGenerate Simulink Design Verifier report
sldvchecksumReturns checksum of model (Da R2021a)

Argomenti