メインコンテンツ

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

copySimulationSettings

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

等価性テスト ケースのシミュレーション設定のコピー

構文

copySimulationSettings(tc,fromSimIndex,toSimIndex)

説明

copySimulationSettings(tc,fromSimIndex,toSimIndex) は、等価性テスト ケース内のあるシミュレーション番号から別のシミュレーション番号にシミュレーション設定をコピーします。この関数は等価性テスト ケース タイプに対してのみ機能します。

入力引数

すべて展開する

シミュレーション設定のコピー元の等価性テスト ケース。sltest.testmanager.TestCase オブジェクトとして指定します。

設定のコピー元のシミュレーション番号。整数の 1 または 2 として指定します。これはソース シミュレーションです。

設定のコピー先のシミュレーション番号。整数の 1 または 2 として指定します。これはターゲット シミュレーションです。

すべて展開する

% 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);

% Change simulation stop time in Simulation 1
setProperty(tc,'StopTime',100,'SimulationIndex',1);

% Copy simulation setting to Simulation 2
copySimulationSettings(tc,1,2);

バージョン履歴

R2015b で導入