setProperty
Class: sltest.testmanager.TestSuite
Namespace: sltest.testmanager
Set test suite property
Syntax
setProperty(ts,Name,Value)
Description
setProperty(
sets
a test suite property.ts
,Name,Value
)
Input Arguments
ts
— Test suite
sltest.testmanager.TestSuite
object
Test suite object to set the property, specified as an sltest.testmanager.TestSuite
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-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: 'a = 300; % set nominal value'
CleanupCallback
— Cleanup callback script
empty (default) | character vector
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: 'clear a % clear value from workspace'
Examples
Set Test Suite Property
% 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
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)