sltest.testmanager.getpref
获取测试管理器预设项
语法
说明
返回一个或多个组 settings
= sltest.testmanager.getpref(group
,preferences
)preferences
的测试管理器预设项。
示例
获取测试套件部分预设项
获取测试套件中出现的部分的预设项。
获取测试套件显示的预设项。值为 1
表示该部分出现。
settings = sltest.testmanager.getpref('TestSuiteDisplay')
settings = struct with fields: TestTag: 1 Description: 1 Requirement: 1 Callback: 1 Coverage: 1
获取 Description
和 Requirement
预设项设置的设置。
settings = sltest.testmanager.getpref('TestSuiteDisplay',{'Description','Requirement'})
settings = struct with fields: Description: 1 Requirement: 1
获取 MATLAB 发布信息
获取测试管理器中可用的 MATLAB® 版本列表。
获取 MATLAB 发布预设项列表。
settings = sltest.testmanager.getpref('MATLABReleases')
ans = 1×2 struct array with fields: Name MATLABRoot IsDefault Selected
获取 Name
值。
settings.Name
ans = '14a' ans = 'R2017b'
获取命令提示符下显示日志的值
显示 ShowSimulationLogs
IncludeOnCommandPrompt
的当前设置。值 0
表示关闭显示日志,值 1
表示打开显示日志。
settings = sltest.testmanager.getpref... ('ShowSimulationLogs','IncludeOnCommandPrompt')
ans = logical 1
输入参数
group
— “预设项”组
'TestFileDisplay'
| 'TestSuiteDisplay'
| 'TestCaseDisplay'
| 'MATLABReleases'
| 'ShowSimulationLogs'
| 'ResultSetProperty'
预设项组名称,指定为以下值之一:
'TestFileDisplay'
— 文件预设项及其显示状态'TestSuiteDisplay'
— 测试套件预设项及其显示状态'TestCaseDisplay'
— 测试用例预设项选项及其显示状态'MATLABReleases'
— 可供测试的版本'ShowSimulationLogs'
— 是否在命令提示符下显示仿真日志'ResultSetProperty'
— 用于结果集的名称
preferences
— 预设项名称
字符向量 | 字符向量元胞数组
预设项名称,指定为字符向量或字符向量元胞数组。使用 settings = sltest.testmanager.getpref(group)
获取每个 group
的有效预设项。
示例: ('TestSuiteDisplay','Description')
示例: ('ResultSetProperty','ResultSetName')
输出参量
settings
— 测试管理器预设项
结构体
预设项设置,以结构形式返回。
版本历史记录
在 R2017a 中推出
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)