Main Content

getBaselineCriteria

Class: sltest.testmanager.TestCase
Package: sltest.testmanager

Get baseline criteria

Syntax

baselines = getBaselineCriteria(tc)

Description

baselines = getBaselineCriteria(tc) gets the baseline criteria sets in a test case and returns them as an array of baseline criteria objects, sltest.testmanager.BaselineCriteria.

Input Arguments

expand all

Baseline test case that you want to get baseline criteria from, specified as a sltest.testmanager.TestCase object.

Output Arguments

expand all

Baseline criteria that are in the baseline test case, returned as an array of sltest.testmanager.BaselineCriteria objects.

Examples

expand all

% 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 one signal
sc = getSignalCriteria(baseline);
sc(1).AbsTol = 9;

% Get baseline criteria
baselineOut = getBaselineCriteria(tc);
Introduced in R2015b