Documentation Center

  • 評価版
  • 製品アップデート


Run series of SystemTest test files




strun(testfile) runs the SystemTest™ test file specified by the string testfile. You can specify testfile as the name of a test file, or as the full path to a test file. If a test file name is specified without a full path, the test file must reside on the MATLAB® path.

testfile may also be specified as a 1-by-N or N-by-1 cell array of test files, each of which is run serially.

Running tests that you set up in the SystemTest software from the MATLAB command line using strun is useful for running multiple test files as a batch or calling a test file as part of a MATLAB file.

    Note:   If the SystemTest desktop is open when strun is called, strun leaves it open. Otherwise, strun closes the desktop after the test runs.

strun will run in a synchronous manner, that is, the MATLAB command line will be blocked until strun finishes executing. strun will finish executing when either of the following conditions is met:

  • All test files have finished executing.

  • A Ctrl+C is issued.

When a test is run, it is executed using the settings specified in the test file.

If only one test file is specified, and the test encounters an execution error, strun will error. If multiple test files have been specified, a warning will be issued for any test execution errors, and the remaining test files will be run.

Note that it is recommend that you run the test from the SystemTest desktop to verify that elements are not in an error state, and the test will run successfully, before running it via the MATLAB command line using this function.

Note that MATLAB will remain busy while tests are executing via the strun command. Control is returned to the MATLAB command line once all tests execute.


Run a test called mytest that is on the MATLAB path.


Run a test called mytest that is not on the MATLAB path, but is in a local directory called c:\work.


Run two tests, called mytest and mytest2, that are both on the MATLAB path.

strun({'mytest' 'mytest2'})

Run three tests, two of which are on the MATLAB path, and one of which is not.

strun({'mytest' 'c:\work\mytest2.test' 'mytest3'})
Was this topic helpful?