sltest.testmanager.TestCaseResult クラス
名前空間: sltest.testmanager
スーパークラス: sltest.testmanager.TestIterationResult
テスト ケース結果データにアクセスする
説明
作成
は tcr = getTestCaseResults(ResultSet)ResultSet からテスト ケース結果 tcr を返します。
プロパティ
個々のテスト ケース結果内のテストの総数。整数として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
個々のテスト ケース結果内のパスしたテストの数。整数として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
個々のテスト ケース結果内の失敗したテストの数。整数として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
個々のテスト ケース結果内の無効なテストの数。整数として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
個々のテスト ケース結果内の未完了のテストの数。整数として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
個々のテスト ケース結果の最終結果。列挙値として返されます。有効な値は次のとおりです。
Disabled
Failed
Incomplete
Passed
Running
Scheduled
Untested
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケース名。string として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
入力データ ファイルのパス。string として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケース結果の作成に使用されたテスト ファイルのパス。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
親の結果セットの階層構造パス。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト マネージャーで使用可能な 3 つのテスト ケースからのテスト ケースのタイプ (シミュレーション、ベースライン、等価性)。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
シミュレーションがターゲットで実行されるかどうかを示します。boolean の cell 配列として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースの実行が開始された時間。datetime として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースが完了した時間。datetime として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースの実行時間の長さ (秒)。duration として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースに関連付けられた要件。string の配列として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースによって生成されたエラー メッセージ。struct として返されます。この struct には、TestCase と Simulation という 2 つのフィールドが含まれています。TestCase フィールドは、テスト ケースの名前を含む string 配列です。Simulation フィールドは、2 つのフィールド simulationIndex および messages をもつ struct です。messages フィールドは、エラー メッセージのテキストを含む string 配列です。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースによって生成されたログ メッセージ。struct として返されます。この struct には、TestCase と Simulation という 2 つのフィールドが含まれています。TestCase フィールドは、テスト ケースの名前を含む string 配列です。Simulation フィールドは、2 つのフィールド simulationIndex および messages をもつ struct です。messages フィールドは、ログ メッセージのテキストを含む string 配列です。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースの失敗の原因。string の配列として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースが無効にされた理由を示す説明テキスト。string として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースで使用されたベースライン ファイルの名前。string として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
外部入力と外部入力ファイルの名前。struct として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
モデル パラメーターをオーバーライドできるテスト ケースのパラメーター。sltest.testmanager.ParameterSet オブジェクトの名前、オブジェクトのパス、およびパラメーター オーバーライドをリストする構造体を含む struct として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
故障セット情報。struct として返されます。この構造体には、次の 2 つのフィールドが含まれています。
FaultSetName— 故障セットの名前。文字ベクトルとして返されます。SpecifiedFaults— 故障セット内のイネーブルになっている故障。struct として返されます。この構造体の各要素は、次の 3 つのフィールドを含む struct です。ModelElement— 故障のモデル要素パス。文字ベクトルとして返されます。FaultName— 故障名。文字ベクトルとして返されます。Trigger— 故障のトリガー タイプ。文字ベクトルとして返されます。
これらの故障プロパティの詳細については、Specify Fault Properties (Simulink Fault Analyzer)を参照してください。
Simulink® Fault Analyzer™ がない場合、このプロパティは空になります。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースで使用された信号エディター シナリオの名前。string として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースで使用されたテスト シーケンス シナリオ。struct として返されます。この struct には、TestSequenceBlock と TestSequenceScenario という 2 つのフィールドが含まれています。TestSequenceBlock フィールドは、シナリオを含む Test Sequence ブロックのパスです。TestSequenceScenario は、テスト中に実行されたシナリオの名前です。テスト ケースに反復が含まれていなかった場合にのみ、テスト シーケンス情報が TestCaseResult オブジェクトで返されます。反復が含まれていた場合、TestSequenceScenario が TestIterationResults オブジェクトで返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
R2024a 以降
テスト ケースを実行する前にモデルに適用されたバリアント コンフィギュレーション。Name、Description、および ControlVariables の各フィールドを含む struct として指定します。
このプロパティは、Variant Manager for Simulink を使用して作成されたバリアント コンフィギュレーションをもつモデルに対して、テスト ケース オブジェクトで VariantConfiguration プロパティが指定されている場合に適用されます。
例については、Run Tests for Variant Models Using Variant Configurationsを参照してください。
例: "LinInterExpNoNoise"
属性:
GetAccess | public |
SetAccess | private |
Dependent | true |
NonCopyable | true |
データ型: struct
シミュレーションのメタデータ。Simulink.SimulationMetadata オブジェクトとして返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テストが実行されたリリース。文字ベクトルとして返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースの説明。文字ベクトルとして返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト カバレッジ結果。文字配列として返されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ファイル結果をフィルター処理するためのタグ。タグを使用して、テスト結果のサブセットを表示します。詳細については、タグを参照してください。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
結果の親。テスト ケース結果の親は、テスト スイート結果または結果セット オブジェクトです。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケース結果とともに保存されたカスタム データ。任意の型のデータとして指定します。このフィールドは、結果を取得するために使用された設定など、カスタムの情報を追加するために使用します。
属性:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケース結果を生成するために使用された RoadRunner 設定。これらのフィールドを含む構造体として返されます。
RoadRunnerProjectPath— RoadRunner プロジェクトのパスRoadRunnerInstallationPath— RoadRunner アプリケーションのパスRoadRunnerScenarioPath— RoadRunner シナリオのパスRunInConsoleMode— シナリオがコンソール モードまたはグラフィカル モードのいずれで実行されたかTurnOffPacing— シナリオがペーシングをオフにして実行されたか、オンにして実行されたか
このプロパティは、RoadRunner テスト ケースにのみ適用されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
テスト ケースが実行されたプラットフォーム。string として返されます。このプロパティは、RoadRunner テスト ケースにのみ適用されます。
属性:
SetAccess | private |
GetAccess | public |
Dependent | true |
NonCopyable | true |
メソッド
getAssessmentResults | Get logical and temporal assessment results for test case result |
getBaselineRun | Get test case baseline dataset |
getTestCase | 結果を生成したテスト ケースを取得する |
getComparisonResult | Get test data comparison result |
getComparisonRun | Get test case signal comparison results |
getCoverageResults | カバレッジ結果を取得 |
getCustomCriteriaPlots | Get plots from test case custom criteria |
getCustomCriteriaResult | Get custom criteria results from test case result |
getIterationResults | 反復結果を取得 |
getInputRuns | Get inputs from simulations captured with the test result |
getOutputRuns | テスト ケース シミュレーション出力結果を取得 |
getSimulationPlots | Get plots from test case callbacks |
getVerifyRuns | Get test case verify statement |
getTimingInfo | Timing execution information for test case results |
例
この例では、テスト マネージャーからテスト ファイルを実行し、結果セットを取得する方法を示します。この例では、最初のテスト ケースの Outcome は、モデルが指定されていないため Failed です。
テスト ファイル、テスト スイート、およびテスト ケースの構造体を作成します。
tf = sltest.testmanager.TestFile('My Test File'); ts = createTestSuite(tf,'Baseline Test Suite'); tc = createTestCase(ts,'baseline','Baseline Test Case');
テスト ファイルを実行し、出力結果セットを取得します。
resultset = sltest.testmanager.run;
テスト ファイル、テスト スイート、およびテスト ケース結果オブジェクトを取得します。
tfr = getTestFileResults(resultset); tsr = getTestSuiteResults(tfr); tcr = getTestCaseResults(tsr);
テスト ケースに対応するエラー メッセージを取得します。
msg = tcr.ErrorMessages; msg.Simulation.messages
ans = "No model specified. Test did not run."
最初のテスト ケースの Outcome フィールドを表示します。
tcr(1).Outcome
ans =
TestResultOutcomes enumeration
Failed
バージョン履歴
R2015a で導入VariantConfiguration プロパティは、Name、Description、および ControlVariables の各フィールドを含む struct です。
バリアント モデルの場合、VariantConfiguration プロパティには、テスト ケースで使用されたバリアント コンフィギュレーションの名前が含まれます。
RoadRunner テスト ケースにこれらのプロパティが追加されました。
RoadRunnerSetupRunOnPlatform
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)