matlab.unittest.plugins.TestSuiteProgressPlugin class

Package: matlab.unittest.plugins

(Not recommended) Plugin that outputs progress information as text

    Note:   TestSuiteProgressPlugin is not recommended. Use TestRunProgressPlugin instead. To construct a plugin with the same level of detail, use TestRunProgressPlugin.withVerbosity(2).


The TestSuiteProgressPlugin class creates a plugin to output progress information as text. TestSuiteProgressPlugin is added to the TestRunner to show the progress of the testing to the Command Window. This plugin is used by default when you construct a test runner with TestRunner.withTextOutput.


matlab.unittest.plugins.TestSuiteProgressPlugin creates a plugin to output progress information as text.

matlab.unittest.plugins.TestSuiteProgressPlugin(stream) redirects all the text output to the output stream, stream. If you do not specify the output stream, the plugin uses the ToStandardOutput stream.

Input Arguments


Location where the plugin directs text output, specified as an OutputStream.

Default: ToStandardOutput

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects in the MATLAB® documentation.


expand all

Add Plugin to TestRunner

In your working folder, create the file ExampleTest.m containing the following test class.

classdef ExampleTest < matlab.unittest.TestCase
        function testOne(testCase)
            % test code
        function testTwo(testCase)  % Test fails
            % test code
         function testThree(testCase)  % Test passes
             % test code

At the command prompt, create a test suite from the ExampleTest class.

import matlab.unittest.TestRunner
import matlab.unittest.TestSuite
import matlab.unittest.plugins.TestSuiteProgressPlugin

suite = TestSuite.fromClass(?ExampleTest);

Create a test runner with no plugins. This code creates a silent runner and provides you with complete control over the installed plugins.

runner = TestRunner.withNoPlugins;

Run the tests.

result1 =;

No output is displayed.

Add TestSuiteProgressPlugin to the runner and run the tests.

result2 =;
Running ExampleTest
Done ExampleTest
Was this topic helpful?