Main Content

sltest.testmanager.Assessment Class

Namespace: sltest.testmanager

Logical or temporal assessment object

Since R2022a

Description

Use objects of the sltest.testmanager.Assessment class to specify the name, summary, requirements, and symbols for a logical or temporal assessment. You can also specify whether the assessment runs when its parent test case runs.

The sltest.testmanager.Assessment class is a handle class.

Creation

You do not create an sltest.testmanager.Assessment object explicitly. Create assessments in the Test Manager, then use getAssessments to obtain the Assessment objects, and addAssessment to add them to another test case.

Properties

expand all

Name of the assessment, specified as a string or character vector.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Whether the assessment runs when the parent test case runs, specified as a numeric or logical 1 (true) or 0 (false).

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Summary line of the assessment, returned as a string or character vector.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Requirements associated with the assessment, returned as a struct.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Symbol objects used in the assessment, specified as an array of sltest.testmanager.AssessmentSymbol objects.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Methods

expand all

Examples

collapse all

Load an existing test file that contains assessments. Get the assessments and then create a new test case and add the assessments to the new test case.

tf = sltest.testmanager.load('test_traffic.mldatx');
ts = getTestSuites(tf);
tc = getTestCases(ts); 

assessObjs = getAssessments(tc);
tc_New = createTestCase(ts);
tc_NewAssess = addAssessment(tc_New,assessObjs);

Clear and close the Test Manager.

sltest.testmanager.clear
sltest.testmanager.clearResults
sltest.testmanager.close

Version History

Introduced in R2022a