メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

getIterationResults

クラス: sltest.testmanager.TestCaseResult
名前空間: sltest.testmanager

構文

iterArray = getIterationResults(result)

説明

iterArray = getIterationResults(result) は、テスト ケース結果の子であるテスト反復結果を返します。

入力引数

すべて展開する

反復結果を取得するテスト ケース結果。sltest.testmanager.TestCaseResult オブジェクトとして指定します。

出力引数

すべて展開する

反復結果セット。sltest.testmanager.TestIterationResult オブジェクトの配列として返されます。

すべて展開する

% Open the model for this example
openExample('sldemo_autotrans');

% Create test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('Iterations Test File');
ts = getTestSuites(tf);
tc = createTestCase(ts,'simulation','Simulation Iterations');

% Specify model as system under test
setProperty(tc,'Model','sldemo_autotrans');
 
% Set up table iteration
% Create iteration object
testItr1 = sltestiteration;
% Set iteration settings
setTestParam(testItr1,'SignalBuilderGroup','Passing Maneuver');
% Add the iteration to test case
addIteration(tc,testItr1);

% Set up another table iteration
% Create iteration object
testItr2 = sltestiteration;
% Set iteration settings
setTestParam(testItr2,'SignalBuilderGroup','Coasting');
% Add the iteration to test case
addIteration(tc,testItr2);

% Run test case that contains iterations
results = run(tc);

% Get iteration results
tcResults = getTestCaseResults(results);
iterResults = getIterationResults(tcResults);

バージョン履歴

R2016a で導入