Main Content

getAssessmentsCallback

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

Get test case assessments callback

Since R2020b

Syntax

callback = getAssessmentsCallback(tc)

Description

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

Examples

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