计算机工程与应用 ›› 2008, Vol. 44 ›› Issue (27): 87-90.DOI: 10.3778/j.issn.1002-8331.2008.27.028

• 研发、设计、测试 • 上一篇    下一篇

Java语言中数组越界故障的静态测试研究

赵鹏宇1,李建茹2,宫云战3   

  1. 1.总装工程兵科研一所,江苏 无锡 214035
    2.唐山学院,河北 唐山 063020
    3.北京邮电大学 网络与交换技术国家重点实验室,北京 100876
  • 收稿日期:2007-11-15 修回日期:2008-02-21 出版日期:2008-09-21 发布日期:2008-09-21
  • 通讯作者: 赵鹏宇

Research on static test about array index out of range in Java language

ZHAO Peng-yu1,LI Jian-ru2,GONG Yun-zhan3   

  1. 1.The First Engineers Scientific Research Institute of the General Armaments Department,Wuxi,Jiangsu 214035,China
    2.Tangshan College,Tangshan,Hebei 063020,China
    3.Network and Exchange Technology State Key Laboratory,Beijing University of Posts and Telecommunications,Beijing 100876,China
  • Received:2007-11-15 Revised:2008-02-21 Online:2008-09-21 Published:2008-09-21
  • Contact: ZHAO Peng-yu

摘要: 面向具体故障的软件测试技术是当今一个研究热点。数组越界是Java程序设计中的常见故障,该类故障极易导致计算结果错误或系统崩溃。针对Java语言中常见数组越界故障进行了分析,并从面向具体故障的测试思想出发,建立了Java语言中数组越界的故障模型,结合静态测试的特点,给出了一种静态查找此类故障的方法。此方法已实现,并已应用于面向故障的软件测试系统中。

Abstract: The software test technology oriented to the special fault is a hotspot in the recent years.Array index out of range is a common fault in Java programme design,which can easily cause system collapse.The paper analyzes the classical array index out of range fault in Java programme,establishes a defect model combining the advantages of static test and gives a static method for searching for such faults.The method has been implemented in the defect-oriented test system.