runTestSuite

Class: matlab.unittest.plugins.TestRunnerPlugin
Package: matlab.unittest.plugins

Extend running of TestSuite array

Syntax

runTestSuite(plugin,pluginData)

Description

example

runTestSuite(plugin,pluginData) extends the running of the original TestSuite array that the test framework hands to the TestRunner.

Input Arguments

plugin

Instance of matlab.unittest.plugins.TestRunnerPlugin.

pluginData

Test suite information, specified as an instance of matlab.unittest.plugins.plugindata.TestSuiteRunPluginData. The test framework uses this information to introspect into the test content.

Examples

expand all

classdef ExamplePlugin < matlab.unittest.plugins.TestRunnerPlugin
    methods (Access = protected)
        function runTestSuite(plugin, pluginData)
            
            % Introspect into pluginData to get TestSuite size
            suiteSize = numel(pluginData.TestSuite);
            fprintf('### Running a total of %d tests\n', suiteSize)
            
            % Invoke the super class method
            runTestSuite@matlab.unittest.plugins.TestRunnerPlugin(plugin, pluginData)
        end
    end
end

Introduced in R2014a

Was this topic helpful?