This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Class: sltest.testmanager.TestFile
Package: sltest.testmanager

Save test file




saveToFile(tf) saves the changes to the test file.

saveToFile(tf,filePath) saves the test file to the specified file path.

Input Arguments

expand all

Test file, specified as a sltest.testmanager.TestFile object.

The file path and name to save the test file at, specified as a character vector.

Example: 'C:\MATLAB\New Test File.mldatx'


expand all

% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('C:\MATLAB\My Test File.mldatx');
ts = createTestSuite(tf,'My Test Suite');
tc = createTestCase(ts,'simulation','Simulation Test Case');

% Remove the default test suite
tsDel = getTestSuiteByName(tf,'New Test Suite 1');

% Assign the system under test to the test case

% Save the test file

% Save test file object as another test file
saveToFile(tf,'C:\MATLAB\New Test File.mldatx');

Introduced in R2015b