节点文献

基于测试覆盖的安全关键软件测试策略研究

A Study of Strategies about Testing Safety Critical Software Based on Testing Coverage

【作者】 张波

【导师】 沈湘衡;

【作者基本信息】 中国科学院研究生院(长春光学精密机械与物理研究所) , 机械电子工程, 2012, 博士

【摘要】 在航空、航天及军事等安全关键系统中,软件发挥着至关重要的作用。软件一旦失效将导致系统处于危险状态、严重事故甚至灾难,这类软件被称为安全关键软件。高可靠性是对安全关键软件的基本要求。软件测试作为保证软件质量和可靠性的重要手段已经备受关注。虽然目前在测试方法、测试过程组织和管理等方面的软件测试理论日趋成熟,但是关于“如何在时间、资源有限的条件下,对软件进行充分地测试”这个关键问题仍然没有解决。近年来,安全关键软件作为一个独立的分支被广泛地研究。由于安全关键软件具有时间紧、任务重和可靠性要求高的特点,所以软件测试亟待解决的关键问题在安全关键软件的测试中变得更为突出。软件测试覆盖率可以有效地度量测试充分性和测试效率,其与软件缺陷、软件可靠性之间有着密切的关系。本文在分析国内外安全关键软件测试领域的研究现状基础上,对现有的软件测试理论、软件可靠性测试的研究成果以及安全关键软件的特点进行了系统全面的分析,提出了基于测试覆盖的安全关键软件测试策略,运用该测试策略指导安全关键软件的测试活动,能够提高测试效率,而且能够发现更多的软件缺陷。本文主要贡献和研究成果如下:一、制定了基于测试覆盖的安全关键软件测试策略。该策略的主要思想是依据测试覆盖率增长函数,选择出对测试覆盖率增长有贡献的测试用例;利用测试覆盖率信息和已经发现的缺陷数据预测出软件中残留的缺陷;通过软件缺陷分析,发现测试薄弱点,测试人员有针对性地补充测试用例,可以发现更多的软件缺陷。运用该测试策略能够有效地提高安全关键软件的测试效率和测试的充分性。二、在研究使用测试覆盖率数据指导软件测试时,提出了测试用例对测试覆盖率贡献度的概念,并用数学方法推算出软件测试覆盖率增长函数的通用形式,提出了增强的Inflection-S型测试覆盖率函数。使用NASA公布出的测试数据对提出的函数进行验证,结果表明:本文提出的增强Inflection-S型测试覆盖率函数与已有的测试覆盖率函数相比具有更好的拟合精度,更符合实际测试工作中测试覆盖率增长的情况。三、研究测试覆盖率与软件缺陷之间的关系。为了充分利用测试覆盖信息,本文在深入研究基于时间分布的软件缺陷预测模型基础上,建立了基于测试覆盖的软件缺陷预测模型,该模型能够克服饱和效应对缺陷预测的影响。使用NASA和ESA的共9组测试覆盖率数据和软件缺陷数据对模型进行验证,结果表明:本文提出的基于增强Inflection-S型测试覆盖率函数的缺陷预测模型与已有的软件缺陷预测模型相比,具有预测结果稳定性好、与实际缺陷的吻合度高的优点。四、本文结合航天某型号软件的测试任务进行实验验证。通过详细地分析测试策略的适用条件和指导测试的方法,建立起理论研究与工程实践的桥梁。运用该测试策略对航天某型号软件的测试过程进行指导,实验结果表明:运用本文提出的基于测试覆盖的安全关键软件测试策略指导测试,不仅提高了测试效率,而且能够发现出更多的软件缺陷,保证有效且高效地完成了安全关键软件的测试任务。“如何在时间、资源有限的条件下,对软件进行充分地测试”一直是软件测试领域的难题之一,本文提出的基于测试覆盖的安全关键软件测试策略在解决该难题方面进行了有益的探索,并取得了一定的进展,为相关领域的研究提供了思路。

【Abstract】 Software plays a fatal role in safety critical systems such as aviation system,aerospace system and the military system. Once it becomes invalid, the system will beat dangerous condition or suffer from serious accidents even disasters. Such softwareis called safety critical software whose basic requirement is high reliability.Software testing, as an important means for ensuring quality and reliability ofsoftware, has been under the spotlight. How to cover more defects of the software byexecuting fewer test cases under the urgent conditions is a puzzle confronted bysoftware testing. Measuring the sufficiency and effectiveness of software testing isalso needed to verify the high reliability of the tested safety critical software.The testing coverage is an effective measurement index for the sufficiency andefficiency of testing, and it is closely related to the defects and reliability of thesoftware. In the paper, based on the current research situations, the testing strategiesof safety critical software based on testing coverage are proposed and used to instructtesting the certain safety critical software, which raised the efficiency of testing andthe reliability of safety critical software.This paper mainly makes the following contributions:Ⅰ.The testing strategies about testing safety critical software based on testingcoverage are proposed. The main idea of the testing strategies is generating the test cases by Black-box testing, and choosing the test cases contributing to testingcoverage according to its growth rate, and predicting defects remained in the softwarewith the help of the information about testing coverage and the discovered defects,and replenishing the test cases at pertinence after analyzing the properties and thesocial phenomenon of defects.Ⅱ.After studying how to instruct the software testing with the help of the testingcoverage, the concept of the contribution of test cases to testing coverage is proposed,and the general forms of the growth function of testing coverage is given bymathematical methods, and the enhanced Inflection-S testing coverage function isproposed, which is verified by the test data issued by NASA. The results show thatthe enhanced Inflection-S testing coverage function proposed in the paper has thebetter fitting accuracy than the existing testing coverage functions, and is moreconsistent with the growth of the testing coverage in the real testing work.Ⅲ.The paper studies the relationship between the testing coverage and thedefects of softwares. In order to make full use of the testing coverage, the predictionmodels for software defects based on the time distribution are studied, and theprediction models for software defects are proposed based on it. And it is verified bythe data of the testing coverage and the software defects issued by NASA and ESA.The results show that the enhanced Inflection-S testing coverage function proposedin the paper is more stable and more consistent with the actual number of the defects.Ⅳ.The experiments are combined with the test tasks of the certain space software,and the theoretical researches are applied to instruct the real test tasks. The resultsshow that the testing strategies about safety critical software based on testingcoverage proposed in the paper are able to raise the efficiency of testing, and discoverthe more defects existing in the software by executing the fewer test cases under theurgent conditions, and finish the testing tasks more effectively and efficiently.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络