首页 | 本学科首页   官方微博 | 高级检索  
     

测试Java异常处理机制的方法
引用本文:姜元鹏,张永平,姜淑娟.测试Java异常处理机制的方法[J].计算机工程与设计,2007,28(20):5069-5071,5075.
作者姓名:姜元鹏  张永平  姜淑娟
作者单位:中国矿业大学计算机科学与技术学院 江苏徐州221008
基金项目:中国矿业大学校科研和教改项目
摘    要:异常处理机制能增强程序运行的可靠性,提高软件的健壮性.然而,如果异常处理机制使用不当,会带来许多潜在的错误,因而很有必要对程序的异常处理结构进行测试.提出了一种识别被测程序中的所有异常变量"定义-使用"关系的方法,并使用一个异常的定义-捕获度量来计算异常定义-使用链的测试覆盖.最后设计了一种异常分析及测试的原型工具.

关 键 词:异常处理  异常测试  定义-使用测试  故障注入  测试覆盖度量  测试覆盖  Java  异常处理机制  方法  mechanism  exception  handling  testing  原型工具  异常分析  设计  使用链  计算  度量  关系  常变量  识别  处理结构  程序运行  错误  使用不当
文章编号:1000-7024(2007)20-5069-03
修稿时间:2006-11-06

Approach to testing Java exception handling mechanism
JIANG Yuan-peng,ZHANG Yong-ping,JIANG Shu-juan.Approach to testing Java exception handling mechanism[J].Computer Engineering and Design,2007,28(20):5069-5071,5075.
Authors:JIANG Yuan-peng  ZHANG Yong-ping  JIANG Shu-juan
Affiliation:School of Computer Science and Technology, China University of Mining and Technology, Xuzhou 221008, China
Abstract:Exception handling mechanism can increase the reliability of the system and improve the robustness of the software.However,incorrect application of exception handling mechanism will bring many potential errors,so it is necessary for exception handling constructs to be tested.A testing methodology is presented to identify the exception variables 'def-uses' to be tested in the tested program,and test coverage of these 'def-uses'links is calculated by using an exception def-catch metric.Finally,a rough prototype tool for exception analysis and testing is designed.
Keywords:exception handling  exception testing  def-use testing  fault injection  test coverage metrics
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号