sltest.testmanager.createTestsFromModel
从模型生成测试用例
说明
示例
从模型创建测试用例
在测试管理器中创建一个包含新测试用例的新测试文件。每个测试用例使用一个信号编辑器场景。
% Open the model for this example openExample('sldemo_autotrans'); testFile = sltest.testmanager.createTestsFromModel... ('C:\MATLAB\TestFile.mldatx','sldemo_autotrans','baseline')
testFile = TestFile with properties: Name: 'TestFile' FilePath: 'C:\MATLAB\TestFile.mldatx' Dirty: 0
输入参数
filePath
— 测试文件名和路径
字符向量
保存生成的测试用例文件的路径和名称,指定为字符向量。
示例: 'C:\MATLAB\TestFile.mldatx'
modelName
— 模型名称
字符向量
生成测试用例的模型的名称,指定为字符向量。
示例: 'mymodel'
testType
— 测试用例类型
'baseline'
(默认) | 'simulation'
| 'equivalence'
要生成的测试用例的类型,指定为字符向量。该函数使用此测试用例类型创建测试用例。
输出参量
testFile
— 测试文件
sltest.testmanager.TestFile
对象
包含生成的测试用例的测试文件,以 sltest.testmanager.TestFile
对象的形式返回。
版本历史记录
在 R2015b 中推出
另请参阅
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)