Main Content


Class: matlab.unittest.TestRunner
Package: matlab.unittest

Create simplest runner possible


runner = matlab.unittest.TestRunner.withNoPlugins


runner = matlab.unittest.TestRunner.withNoPlugins creates a TestRunner that is guaranteed to have no plugins installed and returns it in runner. It is the method one can use to create the simplest runner possible without violating the guarantees a test writer has when writing TestCase classes. This runner is a silent runner, meaning that regardless of passing or failing tests, this runner produces no command window output, although the results returned after running a test suite are accurate.

This method can also be used when it is desirable to have complete control over which plugins are installed and in what order. It is the only method guaranteed to produce the minimal TestRunner with no plugins, so one can create it and add additional plugins as desired.

Output Arguments


matlab.unittest.TestRunner object.



To learn about attributes of methods, see Method Attributes.


expand all

Add matlab.unittest classes to the current import list.

import matlab.unittest.TestRunner
import matlab.unittest.TestSuite

Create a TestSuite array.

suite = TestSuite.fromClass(?mypackage.MyTestClass);

Create a TestRunner object.

runner = TestRunner.withNoPlugins;

% Run the suite silently
result = run(runner,suite)

Using the TestRunner object created in the previous example, control which plugins are installed and in what order they are installed.

Add matlab.unittest class to the current import list.

import matlab.unittest.plugins;

Add specific plugins.


Rerun the tests.

result = run(runner,suite)