teardownTestMethod

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

Extend tearing down of test method

Syntax

teardownTestMethod(plugin,pluginData)

Description

example

teardownTestMethod(plugin,pluginData) extends the tearing down of a test method. This method defines how the TestRunner performs test method teardown for the single test suite element. The test framework evaluates this method within the scope of the runTest method of the TestRunnerPlugin.

Input Arguments

plugin

Instance of matlab.unittest.plugins.TestRunnerPlugin.

pluginData

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

Examples

expand all

Display the test method name at teardown time.

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

Introduced in R2014a

Was this topic helpful?