代码覆盖率
在 SIL 或 PIL 仿真期间为生成的代码收集度量
在软件在环 (SIL) 和处理器在环 (PIL) 仿真期间收集代码覆盖率度量。您可以利用这些度量证明生成的代码不包含不需要的功能。
主题
代码覆盖率与 Simulink Coverage
- Simulink Code Coverage Metrics
Metrics produced by code coverage analysis. - Code Coverage for Models in Software-in-the-Loop (SIL) Mode and Processor-in-the-Loop (PIL) Mode
Configure code coverage for SIL and PIL simulations and review results. - 软件在环代码覆盖率 (Simulink Coverage)
此示例展示如何使用软件在环 (SIL) 模式从模型参考收集代码覆盖率度量。 - 使用代码窗格查看和过滤代码覆盖率结果 (Simulink Coverage)
此示例展示了如何直接从 Simulink® 中的代码窗格查看代码覆盖率结果并申述代码覆盖率结果。 - 评估模型与代码覆盖率之间的差异 (Simulink Coverage)
此示例演示了如何使用 Simulink® Test™ Manager 分析模型覆盖率和生成代码覆盖率,并调查结果中的差异。有关如何在不使用 Simulink Test 的情况下分析代码覆盖率的信息,请参阅使用 Simulink Coverage 收集代码覆盖率度量 (Simulink Coverage)和软件在环代码覆盖率 (Simulink Coverage)。
代码覆盖率与第三方工具
- Configure Code Coverage with Third-Party Tool
Use LDRA tool suite to collect code coverage metrics during a SIL or PIL simulation. - Configure Code Coverage Programmatically
Use line commands to set up third-party code coverage analysis for a SIL or PIL simulation. - View Code Coverage Information at the End of SIL or PIL Simulations
Access results from third-party code coverage tool. - Code Coverage Summary and Annotations
Third-party code coverage tool produces code generation report with summary data and annotated coverage information. - 使用第三方工具收集代码覆盖率度量
使用第三方工具测量代码覆盖率。 - 第三方代码覆盖率工具支持
第三方代码覆盖率工具和编译器支持。 - Tips and Limitations
Miscellaneous information about code coverage with third-party tool.