run
类: matlab.unittest.TestCase
包: matlab.unittest
运行 TestCase
测试
语法
result = run(testCase)
result = run(testCase,testMethod)
说明
使用 result
= run(testCase
)testCase
作为原型来运行 TestSuite
数组,该数组是通过用来定义 testCase
的类中的所有测试方法创建的。此测试套件使用配置为文本输出的 TestRunner
对象运行。
使用 result
= run(testCase
,testMethod
)testCase
作为原型来运行根据 testMethod
创建的 TestSuite
数组。此测试使用配置为文本输出的 TestRunner
对象运行。
这种方法很方便,允许在 MATLAB® 中以交互方式试验 TestCase
类,同时又可使用支持的 TestRunner
对象运行类中包含的测试。
输入参数
|
|
|
所需测试方法的名称,指定为下列类别之一:
该方法必须与 |
输出参数
|
包含测试运行结果的 |