Input
È possibile sviluppare scenari di test mappando dati esterni ai casi di test, creando dati di input o generando automaticamente input utilizzando Simulink® Design Verifier™:
Creare un file MAT modello o un file Excel® dal modello e aggiungere i valori.
Creare un test direttamente dai dati contenuti nei file Excel. Per maggiori informazioni, vedere Use External File Data in Test Cases.
Mappare i file MAT o Excel al sistema sottoposto a test.
Generare input di test in Simulink Design Verifier per estendere la coverage o replicare condizioni di errore di progettazione. Aggiungere i test generati al file di test.
Posizionare un blocco Signal Editor nel sistema sottoposto a test e creare graficamente gli input.
È inoltre possibile creare input di test che reagiscono al comportamento della simulazione utilizzando un blocco Test Sequence. Utilizzare un blocco Test Sequence per definire insiemi di fasi e transizioni utilizzando MATLAB® come linguaggio di azione. È inoltre possibile utilizzare gruppi di fasi sequenziali o a commutazione in una gerarchia e creare sequenze di test in un blocco Test Sequence.
Blocchi
| Test Sequence | Create simulation testing scenarios, function calls, and assessments |
Strumenti
| Simulink Test Manager | Testing models and code in different execution environments, manage test suites, and analyze and report results |
Argomenti
Utilizzo di dati esterni
- Create External Data Files to Use in Test Cases
Create Excel, MAT, and script (.m) files for test data input. - Use External File Data in Test Cases
Add test data from Excel files, MAT files, and MATLAB script (.mfiles) to test cases.
Generazione degli input di test
- Increase Coverage by Generating Test Inputs
Use Simulink Design Verifier to generate tests that extend coverage and recreate design errors, and add generated tests to your test file. - Generate Test Signals
Generate signal inputs to the component under test.
Utilizzo di una sequenza di fasi di test
- Test Sequence Basics
Overview of test sequence actions, transitions, and hierarchy. - Test Sequence Editor
How to use test steps, transitions, data, andWhendecomposition sequences in Test Sequence and 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. - Transitions, Temporal Operators, and Messages in Test Sequence Blocks
Transition between test sequence steps using conditional logic, temporal operators, and messages. - Using an External Function in a Test Sequence Block
Call externally-defined function from Test Sequence block.