Main Content

teardownTestClass

Class: matlab.unittest.plugins.TestRunnerPlugin
Namespace: matlab.unittest.plugins

Extend tearing down test class

Description

teardownTestClass(plugin,pluginData) extends the tearing down of a test class. This method defines how the test runner performs test class teardown. The testing framework evaluates this method within the scope of the runTestClass method. If the test class contains properties with the ClassSetupParameter attribute, the testing framework evaluates the teardownTestClass method as many times as the class setup parameterization dictates.

example

Input Arguments

expand all

Plugin, specified as a matlab.unittest.plugins.TestRunnerPlugin object.

Test class teardown information, specified as a matlab.unittest.plugins.plugindata.ImplicitFixturePluginData object. The testing framework uses this information to describe the test content to the plugin.

Attributes

Accessprotected

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Create a plugin and override the teardownTestClass method to display the test class name at teardown time.

classdef ExamplePlugin < matlab.unittest.plugins.TestRunnerPlugin
    methods (Access=protected)
        function teardownTestClass(plugin,pluginData)
            fprintf('### Tearing down: %s\n',pluginData.Name)
            teardownTestClass@ ...
                matlab.unittest.plugins.TestRunnerPlugin(plugin,pluginData)
        end
    end
end

Version History

Introduced in R2014a