sltest.testmanager.ParameterSet - Add or modify parameter set - MATLAB (original) (raw)

Namespace: sltest.testmanager

Add or modify parameter set

Description

Instances of sltest.testmanager.ParameterSet are sets of parameters in a test case that can override model parameters.

The sltest.testmanager.ParameterSet class is a handle class.

Creation

`obj` = sltest.testmanager.TestCase.addParameterSet creates a sltest.testmanager.ParameterSet object for a test case object.

Properties

expand all

Name of the parameter set, specified as a string. If the parameter set was created from a MAT file, the name is derived from the MAT filename and is read-only.

Attributes:

SetAccess public
GetAccess public
Dependent true
NonCopyable true

File path of the parameter set if parameters were added from a file, returned as a character vector.

Attributes:

SetAccess private
GetAccess public
Dependent true
NonCopyable true

Indicates whether to use the overrides in the parameter set during test execution. If Active is 0, the overrides are not used. If Active is1, the overrides are used.

Attributes:

SetAccess public
GetAccess public
Dependent true
NonCopyable true

Sheet and range information for Microsoft® Excel® file, returned as a 1-by-N array, where each row has aSheet and Range value. SpecifyRange as shown in the table.

Ways to specify Range Description
'Corner1:Corner2'Rectangular Range Specify the range using the syntax'Corner1:Corner2', where Corner1 and_Corner2_ are two opposing corners that define the region. For example, 'D2:H4' represents the 3-by-5 rectangular region between the two cornersD2 and H4 on the worksheet. The 'Range' name-value pair argument is not case-sensitive, and uses Excel A1 reference style (see Excel help).Example: 'Range','Corner1:Corner2'
''Unspecified or Empty If unspecified, the importing function automatically detects the used range.Example: 'Range',''Note: Used Range refers to the rectangular portion of the spreadsheet that actually contains data. The importing function automatically detects the used range by trimming leading and trailing rows and columns that do not contain data. Text that is only white space is considered data and is captured within the used range.
'Row1:Row2'Row Range You can identify the range by specifying the beginning and ending rows using Excel row designators. Thenreadtable automatically detects the used column range within the designated rows. For instance, the importing function interprets the range specification '1:7' as an instruction to read all columns in the used range in rows 1 through 7 (inclusive).Example: 'Range','1:7'
'Column1:Column2'Column Range You can identify the range by specifying the beginning and ending columns using Excel column designators. Thenreadtable automatically detects the used row range within the designated columns. For instance, the importing function interprets the range specification 'A:F' as an instruction to read all rows in the used range in columns A through F (inclusive).Example: 'Range','A:F'
'NamedRange'Excel Named Range In Excel, you can create names to identify ranges in the spreadsheet. For instance, you can select a rectangular portion of the spreadsheet and call it 'myTable'. If such named ranges exist in a spreadsheet, then the importing function can read that range using its name.Example: 'Range','myTable'

Attributes:

GetAccess public
SetAccess public
Dependent true
NonCopyable true

Data Types: array

Methods

Examples

collapse all

Open the model for this example.

Create the test file, test suite, and test case structure.

tf = sltest.testmanager.TestFile("API Test File"); ts = createTestSuite(tf,"API Test Suite"); tc = createTestCase(ts,"baseline","Baseline API Test Case");

Remove the default test suite.

tsDel = getTestSuiteByName(tf,"New Test Suite 1"); remove(tsDel);

Assign the system under test to the test case.

setProperty(tc,"Model","sldemo_absbrake");

Capture the baseline criteria.

baseline = captureBaselineCriteria(tc,"baseline_API.mat",true);

Test a new model parameter by overriding it in the test case parameter set.

ps = addParameterSet(tc,"Name","API Parameter Set"); po = addParameterOverride(ps,"m",55);

Clear the Test Manager.

sltest.testmanager.clear sltest.testmanager.clearResults sltest.testmanager.close

Version History

Introduced in R2015b