How to write Assessments for both time/state dependent properties and state-less properties in Simulink Test

조회 수: 2 (최근 30일)
How to write Assessments for both time/state dependent properties and state-less properties in Simulink Test with and without Simulink Design Verifier?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 5월 17일
편집: MathWorks Support Team 2023년 5월 17일
Without Simulink Design Verifier:
1) If there is only one time-/state-dependent property, then you can use steps and sub-steps.
Then, put the assert/verify statements for the stateless properties into the parent step (which runs always), and for the time-/state-dependent property into the sub-steps (which can have transition between sub-steps).
2) Another approach is to use more than one Test Sequence block. This is probably easiest if there are more than one time-/state-dependent property, so, you would put assessments for each property into its own Test Sequence block. You can add as many Test Sequences as needed into the Test Harness after it's created.
With Simulink Design Verifier:
1) Simulink Design Verifier checks for complete coverage of your model. If your model is 100% covered. You will be presented with the option of creating a test harness automatically. This will then create all the test cases for part of your model. This workflow is outlined in the documentation below:
Run below command in R2017b for documentation:
>> web(fullfile(docroot, 'sldv/ug/generate-test-cases-for-model-decision-coverage.html'))
Or refer to the following link for latest documentation:
To deal with time/state dependent properties, Simulink Design Verifier has the temporal operator blocks, Detector, Extender, and Within Implies.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Test Execution에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by