Main Content

teardownSharedTestFixture

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

Extend tearing down shared test fixture

Description

example

teardownSharedTestFixture(plugin,pluginData) extends the tearing down of a shared test fixture. This method defines how the test runner performs shared fixture teardown. The testing framework evaluates this method one time for each shared test fixture, within the scope of the runTestSuite method.

Input Arguments

expand all

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

Shared test fixture teardown information, specified as a matlab.unittest.plugins.plugindata.SharedTestFixturePluginData 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 teardownSharedTestFixture method to display the shared test fixture name at teardown time.

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

Version History

Introduced in R2014a