Main Content

getAssessments

Class: sltest.testmanager.TestCase
Namespace: sltest.testmanager

Get assessments associated with test case

Since R2022a

Syntax

assessments = getAssessments(tc)

Description

assessments = getAssessments(tc) returns the assessments for a test case object.

Input Arguments

expand all

Test case for which to get assessments, specified as an sltest.testmanager.TestCase object.

Output Arguments

expand all

Assessments associated with the test case, returned as an array of sltest.testmanager.Assessment objects.

Examples

expand all

Get the assessments from a test case and view the details of the first assessment.

tf = sltest.testmanager.load('test_traffic.mldatx');

ts = tf.getTestSuites;
tc = tf.getTestSuites.getTestCases;
assessObjs = tc.getAssessments; 
assessObjs(1)
ans = 
  Assessment with properties:

            Name: 'Waiting cars'
         Enabled: 0
            Info: "At any point of time, NumCars must be greater than or equal to int32(0)"
    Requirements: [0x1 struct]
         Symbols: [1x1 sltest.testmanager.AssessmentSymbol]

Version History

Introduced in R2022a