teardownSharedTestFixture

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

Extend tearing down shared test fixture

Syntax

teardownSharedTestFixture(plugin,pluginData)

Description

example

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

Input Arguments

plugin

Instance of matlab.unittest.plugins.TestRunnerPlugin.

pluginData

Shared test fixture teardown information, specified as an instance of matlab.unittest.plugins.plugindata.SharedTestFixturePluginData. The test framework uses this information to introspect into the test content.

Examples

expand all

Display the shared test fixture name at teardown time.

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

Introduced in R2014a

Was this topic helpful?