Valutazioni, criteri e verifiche
I test funzionali includono la valutazione del comportamento della simulazione e il confronto dei dati della simulazione con i risultati attesi. È possibile valutare il comportamento della simulazione:
Utilizzando valutazioni temporali e logiche in un caso di test.
Includendo dichiarazioni
verifye altri operatori in un blocco Test Assessment o Test Sequence. Utilizzando il blocco Test Sequence per specificare una serie di fasi per stimolare il componente o il sistema sottoposto a test. Utilizzando il blocco Test Sequence per specificare una serie di fasi per stimolare il componente o il sistema sottoposto a test.Utilizzando i blocchi della libreria Model Verification (Verifica del modello).
È possibile valutare i dati di simulazione:
Confrontando l'output del test con i dati baseline o confrontando l'output di due simulazioni utilizzando criteri di equivalenza.
Utilizzando tolleranze di valore o di tempo quando si confrontano i dati di simulazione con i dati baseline o quando si confrontano due simulazioni. I tipi di tolleranza disponibili sono relativi, assoluti, anticipati e ritardati. Le tolleranze anticipate e ritardate sono utili per i confronti in cui la temporizzazione dei dati è diversa, ad esempio i confronti tra diversi risolutori o tra modelli eseguiti sul desktop e codice eseguito su una destinazione.
Utilizzando uno script con criteri personalizzati per elaborare i dati di simulazione.
Per una panoramica dei diversi metodi di verifica, vedere Assess Simulation and Compare Output Data.
Blocchi
| Observer Reference | Create and contain an Observer model |
| Observer Port | Wirelessly link signals to use with verification |
| Test Sequence | Create simulation testing scenarios, function calls, and assessments |
| Test Assessment | Assess and verify behavior of system under test |
| Sequence Viewer | Display messages, events, states, transitions, and functions between blocks during simulation |
| Assertion | Check whether signal is zero |
Classi
sltest.testmanager.Assessment | Logical or temporal assessment object (Da R2022a) |
sltest.testmanager.AssessmentSymbol | Symbol used in assessment (Da R2022a) |
sltest.testmanager.TestCase | Create or modify test case |
Strumenti
| Simulink Test Manager | Testing models and code in different execution environments, manage test suites, and analyze and report results |
Operatori sintattici
Argomenti
- Assess Simulation and Compare Output Data
Assess simulation behavior and compare to expected output, use
verifyandassertstatements and run-time assessments. - Assess Temporal Logic by Using Temporal Assessments
Use temporal assessments to assess model timing and verify temporal signal logic in the System Under Test.
- Logical and Temporal Assessment Syntax
Learn about the types of logical and temporal assessments and their syntax.
- Verify Model Simulation by Using when Decomposition
Use
Whendecomposition to switch between steps and activateverifystatements in Test Assessment blocks. - Define Test Steps and Assessments
Use operators and functions in Test Sequence and Test Assessment blocks to define tests and verify model simulation.
- Access Model Data Wirelessly by Using Observers
Wirelessly access signal and data information.
- Observe Messages
Observe message signals and obtain message details.
- Observe Conditional Subsystem Signals
Observe signals in conditional subsystems.
- Observe Internal Variables of an FMU
Use an observer to access internal variables of an FMU.
- Set Signal Tolerances
Specify value and time tolerances for baseline and equivalence criteria.



