このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
テスト ハーネス
テスト ハーネスを使用して、モデルに対するテスト固有のシミュレーション環境を作成します。ユニット テスト用に個々のブロックを分離し、入力、検証ロジック、およびダッシュボードのブロックを追加できます。テスト ハーネスに物理プラント モデルを追加して閉ループ テストを実行します。量産モデルを変更する前に、考えられる設計の変更をテスト ハーネスでテストします。
ユニット テストに個々のモデルを使用する場合と比較して、テスト ハーネスでは管理と同期の機能をモデル キャンバスで利用できます。モデルが変更管理下にある場合、メイン モデルを変更することなく、テスト ハーネスを外部ファイルに保存できます。
テスト ハーネスを SIL モードまたは PIL モードでシミュレートすることで生成コードをテストできます。C Caller ブロックまたは S-Function ブロックのテスト ハーネスを作成して、外部の手書きコードをテストすることもできます。
ツール
テスト マネージャー | さまざまな実行環境でのモデルとコードのテスト、テスト スイートの管理、結果の解析とレポート |
トピック
- テスト ハーネスとモデルの関係
モデル キャンバスからアクセスする個別のワークスペースとコンフィギュレーション セットを使用して、分離された環境で Simulink® モデルをテストする。
- テスト ハーネスの作成
テスト ハーネスを使用してテスト対象のコンポーネントを分離する。
- Create or Import Test Harnesses and Select Properties
Create, import, and customize test harness configurations for your model and subsystem.
- Manage Test Harnesses
Manage test harnesses, including opening, converting, closing, deleting, and exporting.
- Synchronize Changes Between Test Harness and Model
Transfer configuration sets and workspace variables, update component design, and rebuild harness to reflect the latest design.
- Test Harness Construction for Specific Model Elements
Describes how test harnesses are constructed for certain Simulink semantics and component types.
- Test Library Blocks
Test reusable components using tests for libraries, library blocks, and linked blocks.
- Customize Test Harnesses
Create reusable functions and callbacks that customize test harnesses.
- Create Test Harnesses from Standalone Models
Import standalone models as test harnesses in Simulink Test™.
- Use Stateflow Chart for Test Harness Inputs and Scheduling
Use Stateflow Chart to define test harness inputs and test sequence.