Main Content


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

Get test case assessments callback

Since R2020b


callback = getAssessmentsCallback(tc)


callback = getAssessmentsCallback(tc) returns the assessments callback for the specified test case.

Input Arguments

expand all

Test case to which the assessment callback is associated, specified as an sltest.testmanager.TestCase object.

Data Types: string

Output Arguments

expand all

Assessments callback, returned as a string.

Data Types: string


expand all

Specify the test file and get the test suite and test case object in the file. Assume there is only one test suite and one test case in the file. Then, use getAssessmentsCallback to get the callback code.

tf = sltest.testmanager.TestFile('myTestFile.mldatx');
ts = tf.getTestSuites();
tc = ts.getTestCases();

Get the assessment callback for the test case object.

cb = getAssessmentsCallback(tc);

Version History

Introduced in R2020b