matlab.unittest.TestSuite.fromMethod
类: matlab.unittest.TestSuite
命名空间: matlab.unittest
基于单一测试方法创建测试套件
语法
说明
suite = matlab.unittest.TestSuite.fromMethod(
基于 testClass
,testMethod
)testClass
中包含的指定 Test
方法创建一个测试套件,并以 matlab.unittest.TestSuite
数组形式返回该测试套件。
当您调用方法来创建测试套件以及当您运行生成的测试套件时,testClass
必须在路径中。
suite = matlab.unittest.TestSuite.fromMethod(
仅包含满足指定选择器条件的测试。testClass
,testMethod
,selector
)
suite = matlab.unittest.TestSuite.fromMethod(___,
支持上述语法中的输入参量组合,且可使用一个或多个名称-值参量指定选项。例如,Name,Value
)suite = matlab.unittest.TestSuite.fromMethod(testClass,testMethod,"ParameterName","double")
基于指定的 Test
方法创建一个测试套件,该套件仅包括使用名为 "double"
的参数的测试。