Why does my test display "--" instead of an execution percentage in Simulink Test Manager?
6 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2024-9-25
回答: MathWorks Support Team
2024-9-27
I have created a Simulink Model with two subsystems. I am trying to test each subsystem using individual test harnesses for each subsystem. However, when I run the tests in Simulink Test Manager, one test displays an execution percentage of 100%, and the other test displays "--" as seen in the image below:
I have verified that both subsystems successfully run. I anticipated coverage for both subsystems, as each one has a corresponding test harness that is executed within the Simulink Test Manager. What could be the cause of this discrepancy?
采纳的回答
MathWorks Support Team
2024-9-25
When the aggregated coverage results in Simulink Test Manager displays "--" as a subsystem's execution, it means that there is no block that receives coverage. Blocks that receive coverage must be non-virtual blocks. The subsystem that did not receive any coverage and showed "--" in the Simulink Test Manager may contain solely virtual blocks, thus the subsystem did not receive coverage. You can use the "find_system" command to list virtual and non-virtual buses as seen below:
% finds all non-virtual blocks in the current system
>> non_virtual_block = find_system(gcs, 'FollowLinks', 'on', 'Virtual', 'off')
% finds all virtual blocks in the current system
>> virtual_block = find_system(gcs, 'FollowLinks', 'on', 'Virtual', 'on')
For more information on the "find_system" function, please consult the link below:
For more information on virtual versus non-virtual blocks, please consult the link below:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Results, Reporting, and Test File Management 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!