航空学报 > 2002, Vol. 23 Issue (5): 448-454

软件测试的控制论方法

蔡开元, 李永超, 景涛, 白成刚   

  1. 北京航空航天大学自动控制系 北京 100083
  • 收稿日期:2002-01-17 修回日期:2002-07-08 出版日期:2002-10-25 发布日期:2002-10-25

SOFTWARE TESTING IN THE CONTEXT OF SOFTWARE CYBERNETICS

CAI Kai-yuan, LI Yong-chao, JING Tao, BAI Cheng-gang   

  1. Department of Automatic Control, Beijing University of Aeronautics and Astronautics, Beijing 100083,China
  • Received:2002-01-17 Revised:2002-07-08 Online:2002-10-25 Published:2002-10-25

摘要: 软件测试被认为是软件开发过程中理解最为不清的一环。部分原因是虽然有很多策略被定义和分析,但很少有策略被设计和优化。软件测试的反馈机制迄今尚未形成。基于此种情况,软件测试的控制论方法将软件测试问题当作控制问题,被测软件当作被控对象,软件测试策略当作相应的控制器,被测软件和测试策略构成一个闭环反馈控制系统。软件控制论是一门探讨软件理论和工程与控制理论和工程交叉的学科,软件测试的受控马尔可夫链方法利用受控马尔可夫链理论设计和优化软件测试策略,是软件控制论思想的体现。在受控马尔可夫链方法的框架内讨论软件系统的自适应测试,并与随机测试进行比较,发现自适应测试方法相对于传统的随机测试方法具有较大的优越性。

关键词: 软件控制论, 受控马尔可夫链, 软件测试, 自适应测试, 随机测试

Abstract: Software testing is arguably the least understood part of a software development process. One of the major reasons for this status is that various strategies are defined and analyzed, but rarely a software testing strategy is designed and optimized. In response to this status, the controlled Markov chains (CMC) approach to software testing treats the software testing as a control problem. The software under test serves as a controlled object that is modeled as a controlled Markov chain, and the software testing strategy serves as the corresponding controller. They constitute a closed loop feedback system, and the testing strategy is designed and optimized in accordance with testing goals given a priori in the setting of the theory of controlled Markov chains. The CMC approach justifies the idea of software cybernetics, which is defined as the interplay between software theory/engineering and control theory/engineering. This paper presents an adaptive approach to the software testing problem and then compares adaptive software testing with random testing by simulation examples. Simulation results show that the adaptive software testing is feasible and is superior to the random testing.

Key words: software cybernetics, controlled Markov chain, software testing, adaptive testing, random testing