% Open the model for this example
openExample('sldemo_absbrake');
% 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');
% Add baseline criteria from file
baseline = addBaselineCriteria(tc,'C:\MATLAB\baseline_API.mat');
Excel ファイルをベースラインとして使用し、テスト ケースの既存のベースラインを上書きします。
% Open the model for this example
openExample('sldemo_absbrake');
% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('Excel Test File');
ts = createTestSuite(tf,'Excel Test Suite');
tc = createTestCase(ts,'baseline','Baseline Excel 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');
% Add baseline criteria from file
baseline = addBaselineCriteria(tc,...'C:\MATLAB\myexcel.xlsx','RefreshIfExists',true);
% Open the model for this example
openExample('sldemo_absbrake');
% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('Excel Test File');
ts = createTestSuite(tf,'Excel Test Suite');
tc = createTestCase(ts,'baseline','Baseline Excel 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');
% Add baseline criteria from file
baseline = addBaselineCriteria(tc,...'C:\MATLAB\myexcel.xlsx','SeparateBaselines',false);
% Open the model for this example
openExample('sldemo_absbrake');
% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('Excel Test File');
ts = createTestSuite(tf,'Excel Test Suite');
tc = createTestCase(ts,'baseline','Baseline Excel 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');
% Create sheets and ranges arrays
sheets = ["HotTemp", "ColdTemp", "NominalTemp"];
ranges = ["B2:C30", "D2:E30", "B2:C30"];
% Add baseline criteria from file, using the sheets and cell ranges specified
baseline = addBaselineCriteria(tc,...'C:\MATLAB\myexcel.xlsx','Sheets',sheets,'Ranges',ranges);