Main Content

matlab.unittest.plugins.TestRunnerPlugin class

Package: matlab.unittest.plugins

Plugin interface for extending TestRunner

Description

The TestRunnerPlugin interface enables extension of the matlab.unittest.TestRunner. To customize a test run, create a subclass of TestRunnerPlugin and override select methods. TestRunnerPlugin provides you with a default implementation. Override only the methods that are required to achieve your customization. Every method you implement must invoke its corresponding superclass method, passing along the same instance of pluginData that it receives.

To run tests with this extension, add the custom TestRunnerPlugin to the TestRunner by using the addPlugin method of TestRunner.

Methods

createSharedTestFixtureExtend creation of shared test fixture instances
createTestClassInstanceExtend creation of class-level TestCase instances
createTestMethodInstanceExtend creation of method-level TestCase instances
reportFinalizedResultEnable reporting of finalized test results
reportFinalizedSuiteExtend reporting of finalized TestSuite array
runSessionExtend running of test session
runTestExtend running of single Test element
runTestClassExtend running of Test elements from same class or function
runTestMethodExtend running of single test method
runTestSuiteExtend running of TestSuite array
setupSharedTestFixtureExtend setting up shared test fixture
setupTestClassExtend setting up test class
setupTestMethodExtend setting up test method
teardownSharedTestFixtureExtend tearing down shared test fixture
teardownTestClassExtend tearing down test class
teardownTestMethodExtend tearing down test method

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Tips

  • To run tests in parallel with a TestRunnerPlugin instance, your plugin should subclass the matlab.unittest.plugins.Parallelizable interface. Running tests in parallel requires Parallel Computing Toolbox™.

Introduced in R2014a