Main Content

getAssessmentsCallback

Class: sltest.testmanager.TestCase
Package: sltest.testmanager

Get test case assessments callback

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

  1. 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();
  2. Get the assessment callback for the test case object.

    tc.getAssessmentsCallback()
    
Introduced in R2020b