setProperty
Class: sltest.testmanager.TestFile
Namespace: sltest.testmanager
Set test file property
Syntax
setProperty(tf,Name,Value)
Description
setProperty(
sets
a test file property.tf
,Name,Value
)
Input Arguments
tf
— Test file
sltest.testmanager.TestFile
object
Test file object whose property to set, specified as an sltest.testmanager.TestFile
object.
Name-Value Arguments
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'SetupCallback','a = 300; % set nominal value'
SetupCallback
— Setup callback script
empty (default) | character vector
Test-file level setup callback script, specified as a character vector. The function replaces any existing callback script with this value.
Example: 'a = 300; % set nominal value'
CleanupCallback
— Cleanup callback script
empty (default) | character vector
Test-file level cleanup callback script, specified as a character vector. The function replaces any existing callback script with this value.
Example: 'clear a % clear value from workspace'
Examples
Set Test File Property
% 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
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)