captureEquivalenceCriteria
类: sltest.testmanager.TestCase
命名空间: sltest.testmanager
捕获等效性准则并添加到测试用例
语法
eq = captureEquivalenceCriteria(tc,replaceAll)
说明
在仿真 1 中运行在测系统并捕获等效性准则集。该函数返回一个等效性准则对象,eq
= captureEquivalenceCriteria(tc
,replaceAll
)sltest.testmanager.EquivalenceCriteria
。仅当测试类型为等效性测试用例时才可使用该函数。
输入参数
tc
— 测试用例
sltest.testmanager.TestCase
对象
用于捕获等效性准则的测试用例,指定为 sltest.testmanager.TestCase
对象。
replaceAll
— 替换等效性准则
true
| false
如果测试用例中已经存在准则,则替换现有的等效性准则,指定为布尔值。true
将替换现有准则,如果测试用例中已经存在准则,则 false
会产生错误。
输出参量
eq
— 等价准则对象
对象
等效性准则添加到测试用例,作为 sltest.testmanager.EquivalenceCriteria
对象返回。
示例
将等效性准则添加到测试用例
% Open the model for this example openExample('sldemo_absbrake'); % Create the test file, test suite, and test case structure tf = sltest.testmanager.TestFile('API Test File'); ts = createTestSuite(tf,'API Test Suite'); tc = createTestCase(ts,'equivalence','Equivalence Test Case'); % Remove the default test suite tsDel = getTestSuiteByName(tf,'New Test Suite 1'); remove(tsDel); % Assign the system under test to the test case % for Simulation 1 and Simulation 2 setProperty(tc,'Model','sldemo_absbrake','SimulationIndex',1); setProperty(tc,'Model','sldemo_absbrake','SimulationIndex',2); % Capture equivalence criteria eq = captureEquivalenceCriteria(tc);
版本历史记录
在 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)