Hauptinhalt

setProperty

R2026b

Class: sltest.testmanager.TestFile
Namespace: sltest.testmanager

Set test file property

Syntax

setProperty(tf,Name=Value)

Description

setProperty(tf,Name=Value) sets a test file property.

Input Arguments

expand all

Test file object whose property to set, specified as an sltest.testmanager.TestFile 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-file level setup callback script, specified as a character vector. The function replaces any existing callback script with this value.

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

Test-file level cleanup callback script, specified as a character vector. The function replaces any existing callback script with this value.

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

Examples

expand all

% Create a test file
tf = sltest.testmanager.TestFile('API Test File');

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

Version History

Introduced in R2015b