Check MIL, PIL Test Coverage (programmatically ) in ProcessAdvisor

6 ビュー (過去 30 日間)
Xiaohong shen
Xiaohong shen 2025 年 7 月 3 日
回答済み: Sameer 2025 年 7 月 7 日
I want to have some mechanism to set a test task as failed, when the test coverage is insufficient. I am trying to find a way to get the coverage value from the task "MergeTestResults" MIL and SIL test tasks are already completed in advance.
Does some one know how to get the coverage value programmatically?

採用された回答

Sameer
Sameer 2025 年 7 月 7 日
Once you get the "cvdata" object (e.g., from merged test results), you can extract various coverage metrics such as decision, condition, MCDC, etc., using Simulink Coverage API functions.
For example:
Use the "decisioninfo" function to retrieve decision coverage data:
decisionCov = decisioninfo(cvdo, 'myModel');
Please refer to the following MathWorks documentation links for more details on how to use these functions:
Hope this helps!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCollect Coverage for Models についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by