sltest.testmanager.ComparisonRunResult 类
命名空间: sltest.testmanager
访问比较测试的结果
描述
您可以使用 sltest.testmanager.ComparisonRunResult
的实例访问数据比较(例如基线或等效性检验)的结果。
创建对象
getComparisonResult(t)
创建 sltest.testmanager.ComparisonRunResult
的实例,其中 t
是一个测试结果对象。
属性
Outcome
— 比较结果
sltest.testmanager.ComparisonSignalOutcomes
对象
运行比较的通过或失败结果,指定为 sltest.testmanager.ComparisonSignalOutcomes
对象。
属性:
SetAccess | private |
GetAccess | public |
方法
公共方法
getComparisonSignalResults | 从比较运行结果中获取测试信号比较结果 |
示例
获取基线测试的比较结果
此示例显示如何以编程方式获取基线测试用例第二次迭代的比较结果。
1.获取测试文件的路径,然后运行测试文件。
extf = 'sltestTestCaseRealTimeReuseExample.mldatx';
tf = sltest.testmanager.TestFile(extf);
ro = run(tf);
2.获取测试迭代结果。
tfr = getTestFileResults(ro); tsr = getTestSuiteResults(tfr); tcr = getTestCaseResults(tsr); tir = getIterationResults(tcr);
3.获取第 2 次迭代的比较运行结果。
cr2 = getComparisonResult(tir(2))
cr2 = ComparisonRunResult with properties: Outcome: Passed
4.获取运行结果的比较信号结果。
cr2sig = getComparisonSignalResults(cr2)
cr2sig = 1×2 ComparisonSignalResult array with properties: Outcome Baseline ComparedTo Difference
5.清除结果和测试管理器。
sltest.testmanager.clearResults; sltest.testmanager.clear; sltest.testmanager.close;
版本历史记录
在 R2017b 中推出
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)