Package: sltest.testmanager
Superclasses:
Add or modify baseline criteria
An instance of sltest.testmanager.BaselineCriteria
is
a set of signals in a test case that determines the pass-fail criteria
in a baseline test case.
creates
a obj
= sltest.testmanager.TestCase.addBaselineCriteriasltest.testmanager.BaselineCriteria
object for
a test case object.
AbsTol
— Absolute tolerance Absolute tolerance for the baseline criteria set, specified as a scalar.
Active
— Enabled indicator0
| 1
Indicates if the baseline criteria is enabled, 0
if
it is not enabled, and 1
if it is enabled.
ExcelSpecifications
— Sheet and range information for Excel baseline fileThis property is read-only.
Sheet and range information for Microsoft®
Excel® baseline file, returned as a 1-by-N array, where each row has a
Sheet
and Range
value. Specify
Range
as shown in the table.
Ways to specify Range
| Description |
---|---|
Rectangular Range |
Specify the range using the syntax
Example:
|
Unspecified or Empty | If unspecified, the importing function automatically detects the used range. Example:
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. |
Row Range | You can identify the range by specifying the beginning and
ending rows using Excel row designators. Then Example:
|
Column Range | You can identify the range by specifying the beginning and
ending columns using Excel column designators. Then
Example:
|
Excel’s 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 Example:
|
FilePath
— File pathThis property is read-only.
File path of the baseline criteria set, returned as a character vector.
LaggingTol
— Lagging time toleranceLagging time tolerance for the baseline criteria set, specified as a scalar.
LeadingTol
— Leading toleranceLeading time tolerance for the baseline criteria set, specified as a scalar.
Name
— Name of baseline criteriaThis property is read-only.
Name of the baseline criteria, returned as a character vector.
RelTol
— Relative tolerance Relative tolerance for the baseline criteria set, specified as a scalar.
addExcelSpecification | Add a Microsoft Excel sheet to baseline criteria or test case inputs |
getSignalCriteria | Get signal criteria |
remove | Remove baseline criteria |
This example captures a baseline for a test
and changes the absolute tolerance from 0
to 9
.
% 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); % Set the baseline criteria tolerance for a signal sc = getSignalCriteria(baseline); sc(1).AbsTol = 9;