getSummary
Get summary of sltest.AssessmentSet
Syntax
Description
Examples
This example shows how to simulate a model with verify statements and obtain assessment results via the programmatic interface.
Get the Assessment Set and One Assessment Result
1. Open the model.
open_system('sltestRollRefTestExample.slx') % Turn the command line warning off for verify() statements warning off Stateflow:Runtime:TestVerificationFailed

2. Run the model.
s = sim('sltestRollRefTestExample');
3. Get the assessment set.
as = sltest.getAssessments('sltestRollRefTestExample');
4. Get assessment 3 from the assessment set.
as3 = get(as,3);
Display Results of the Assessment Set and Assessment Result
1. Get summary of the assessment set.
asSummary = getSummary(as)
asSummary =
struct with fields:
Total: 6
Untested: 3
Passed: 2
Failed: 1
Result: Fail
2. Display the result of assessment 3.
disp(as3)
sltest.Assessment
Package: sltest
Properties:
Name: 'Simulink:verify_high'
BlockPath: [1×1 Simulink.SimulationData.BlockPath]
Values: [1×1 timeseries]
Result: Fail
3. Find untested or failed results in the assessment set.
asFailUntested = find(as,'Result',slTestResult.Fail,'-or',... 'Result',slTestResult.Untested)
asFailUntested =
sltest.AssessmentSet
Summary:
Total: 4
Untested: 3
Passed: 0
Failed: 1
Result: Fail
Untested Assessments (first 10):
1 : Untested 'Simulink:verify_high'
3 : Untested 'Simulink:verifyTKLow'
4 : Untested 'Simulink:verifyTKNormal'
Failed Assessments (first 10):
2 : Fail 'Simulink:verify_high'
4. Find assessments under the Test Assessment block, using a regular expression.
assessBlock = find(as,'-regexp','BlockPath','.[Aa]ssess')
assessBlock =
sltest.AssessmentSet
Summary:
Total: 6
Untested: 3
Passed: 2
Failed: 1
Result: Fail
Untested Assessments (first 10):
2 : Untested 'Simulink:verify_high'
5 : Untested 'Simulink:verifyTKLow'
6 : Untested 'Simulink:verifyTKNormal'
Passed Assessments (first 10):
1 : Pass 'Simulink:verify_low'
4 : Pass 'Simulink:verify_normal'
Failed Assessments (first 10):
3 : Fail 'Simulink:verify_high'
Re-enable warnings
warning on Stateflow:Runtime:TestVerificationFailed
Input Arguments
This is the sltest.AssessmentSet, from which to get a summary.
Example: sltest.AssessmentSet
Output Arguments
Summary of the assessment set, specified as a struct.
Version History
Introduced in R2016b
MATLAB Command
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)