Main Content

addAssessmentSymbol

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

Add assessment symbols to a test case

Since R2022a

Syntax

addedSymbols = addAssessmentSymbol(tc,assessmentSymbols)

Description

addedSymbols = addAssessmentSymbol(tc,assessmentSymbols) adds assessment symbol objects to the specified test case.

Input Arguments

expand all

Test case for which to add assessment symbols, specified as an sltest.testmanager.TestCase object.

Output Arguments

expand all

Assessment symbols added to the test case, returned as an array of sltest.testmanager.AssessmentSymbol objects.

Examples

expand 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