Main Content

setProperty

R2026b

Class: sltest.testmanager.TestSuite
Namespace: sltest.testmanager

Set test suite property

Syntax

setProperty(ts,Name=Value)

Description

setProperty(ts,Name=Value) sets a test suite property.

Input Arguments

expand all

Test suite object to set the property, specified as an sltest.testmanager.TestSuite object.

Name-Value Arguments

expand all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: SetupCallback='a = 300; % set nominal value'

Test-suite level setup callback script, specified as a character vector. The function deletes any existing callback script and replaces it with the specified character vector.

Example: SetupCallback='a = 300; % set nominal value'

Test-suite level cleanup callback script, specified as a character vector. The function deletes any existing callback script and replaces it with the specified character vector.

Example: CleanupCallback='clear a % clear value from workspace'

Examples

expand all

% Create a test file and new test suite
tf = sltest.testmanager.TestFile('API Test File');
ts = createTestSuite(tf,'API Test Suite');

% Set the setup callback property
setProperty(ts,CleanupCallback='clearvars % Clear variables');

Version History

Introduced in R2015b