matlab.unittest.plugins.TestRunnerPlugin 类
包: matlab.unittest.plugins
用于扩展 TestRunner 的插件接口
描述
TestRunnerPlugin
接口启用 matlab.unittest.TestRunner
的扩展。要自定义测试运行,请创建 TestRunnerPlugin
的一个子类并覆盖所选的方法。TestRunnerPlugin
为您提供默认实现。您只需覆盖实现自定义所必需的方法。您实现的每种方法都必须调用其相应的超类方法,并沿其接收的同一 pluginData
实例传递。
要使用此扩展运行测试,请使用 TestRunner
的 addPlugin
方法将自定义 TestRunnerPlugin
添加到 TestRunner
。
方法
createSharedTestFixture | 扩展共享测试脚手架实例的创建 |
createTestClassInstance | 扩展类级别 TestCase 实例的创建 |
createTestMethodInstance | 扩展方法级别 TestCase 实例的创建 |
reportFinalizedResult | 为最终化测试结果生成报告 |
reportFinalizedSuite | 扩展为最终化的 TestSuite 数组生成的报告 |
runSession | 扩展测试会话的运行 |
runTest | 扩展单个 Test 元素的运行 |
runTestClass | 从同一个类或函数扩展 Test 元素的运行 |
runTestMethod | 扩展单个测试方法的运行 |
runTestSuite | 扩展 TestSuite 数组的运行 |
setupSharedTestFixture | 扩展共享测试脚手架的设置 |
setupTestClass | 扩展测试类的设置 |
setupTestMethod | 扩展设置测试方法 |
teardownSharedTestFixture | 扩展共享测试脚手架的拆解 |
teardownTestClass | 扩展拆解测试类 |
teardownTestMethod | 扩展拆解测试方法 |
复制语义
句柄。要了解句柄类如何影响复制操作,请参阅复制对象。
提示
要与
TestRunnerPlugin
实例并行运行测试,您的插件应子类化matlab.unittest.plugins.Parallelizable
接口。并行运行测试需要 Parallel Computing Toolbox™。