You can run one or more SystemTest™ tests from the MATLAB® command line, using the strun function. This is useful for running multiple test files as a batch or calling a test file as part of a MATLAB file.
The function takes the name of your test file as a string. The test file must be on the MATLAB path, or you can specify the full path in the string.
For example, to run a test called mytest that is on the MATLAB path, use this syntax:
To run a test called mytest that is not on the MATLAB path, but is in a local directory called c:\work, use this syntax:
To run multiple tests, use a cell array of strings, as follows:
If the SystemTest desktop is open when strun is called, strun leaves it open. Otherwise, strun closes the desktop after the test runs.
For more information, see strun.