1、Qt 公司安全关键程序的代码覆盖率|2021 年 12 月 13 日1WHITEPAPERCode Coverage for Safety-Critical ProgramsMetrics&ConsiderationsThis white paper summarizes the different implications and considerations surrounding code coverage for safety-critical programs,along with code coverage requirements mandated by four major s
2、tandards governing safety-critical software in various industry contexts.First,we discuss the emergence of safety-critical software as part of modern systems.Next,we define code coverage analysis,how it works,and why it is used as a pre-requisite for achieving certification.Third,we define the most
3、encountered coverage metrics in software testing,against which test coverage can be measured.We describe their advantages and disadvantages in the context of quality assurance,and finally,state their relevance to the four safety standards.安全关键程序的代码覆盖率指标与注意事项本白皮书总结了围绕安全关键程序代码覆盖的不同定义和考虑因素,以及不同行业管理安全关键
4、软件的四种主要标准中所规定的代码覆盖率要求。首先,我们对作为现代系统一部分的安全关键程序的出现进行了讨论。接下来,我们定义了代码覆盖率分析,介绍它工作原理以及为什么它被用作获得认证的先决条件。第三,我们定义了软件测试中最常见的覆盖率指标,可以根据这些指标来衡量测试覆盖率。我们描述了它们在质量保证中的优、缺点,并在最后指出了它们与四种安全标准的相关性。白皮书Qt 公司安全关键程序的代码覆盖率|2021 年 12 月 13 日2Table of contents1.Safety-Critical Systems as Software.32.Code Coverage Requirements f
5、or Safety-Critical Programs .43.Coverage Metrics.53.1 Function Coverage.53.1.1 Definition.53.1.2 Relevance for Safety Standards.53.2 Line Coverage.63.2.1 Definition.63.2.2 Formatting Dependency.63.2.3 Disguised Control Flow.73.2.4 Relevance for Safety Standards.73.3 Statement Coverage.73.3.1 Definit
6、ion.73.3.2 Relevance for Safety Standards.83.4 Decision(Branch)Coverage.83.4.1 Definition.83.4.2 Relevance for Safety Standards.93.5 Modified Condition/Decision Coverage(MC/DC)Coverage.93.5.1 Definition.93.5.2 Relevance for Safety Standards.103.6 Multiple Condition Coverage(MCC)Coverage.113.6.1 Defi