Main Content

sltest.testmanager.AssessmentSymbol class

Package: sltest.testmanager

Symbol used in assessment

Description

An instance of sltest.testmanager.AssessmentSymbol that specifies the name, scope, and value of the symbol used in an assessment.

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

Creation

You do not create an sltest.testManager.AssessmentSymbol object explicitly. For assessments in the Test Manager, use getAssessmentSymbols to obtain the AssessmentSymbol object. Then, use addAssessmentSymbol to add the symbols to an assessment in another test case. By default when you use addAssessment, the associated symbols are also copied.

Properties

expand all

Symbol name, returned as a string.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Symbol scope, which indicates the type of the assessment symbol, returned as one of these values:

  • Signal

  • Parameter

  • Variable

  • Unresolved

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Symbol value, returned as a struct.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Examples

collapse all

Load an existing test file and get the assessments and symbols from the test file. Create a new test case and add the assessments, but not the symbols, to the new test case. Then, add the associated assessment symbols to the test case.

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

assessObjs = getAssessments(tc);
symbolsObjs = getAssessmentSymbols(tc);

tc_New = createTestCase(ts);
tc_NewAssess = addAssessment(tc_New,assessObjs,...
    "AddSymbols",false);

addedSymbolsObj = addAssessmentSymbol(tc_New,symbolsObjs);

Clear and close the Test Manager.

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

Version History

Introduced in R2022a