首页> 中文期刊> 《计算机应用研究》 >一种针对单元测试框架的测试脚本重用方法

一种针对单元测试框架的测试脚本重用方法

         

摘要

With the wide application of unit testing framework in software industry,some problems have cropped up.One of the principal problems is how can guarantee the test code which developers accumulate not to be wasted,that is how to reuse the test code.This article proposed a solution to solve this problem-reuse the existing unit test code by translating the unit test code automatically.The specific steps was as follows:first,extracted the test case information from the existing unit testing code; then,recorded the information in XML file; finally,generated test code under the rules of new unit testing framework automatically with the technology of XSLT.In the end,this paper verified the feasibility of the method.%单元测试框架下的软件测试将产生大量的测试脚本,在软件测试过程中如何有效利用现有的测试脚本,实现软件测试脚本(代码)的重用成为业界关心的一个重要问题.业界最常见的复用需求是当开发项目更换新的测试框架时,如何重用开发人员在原单元测试框架下积累的测试脚本.针对这一问题,提出了基于测试脚本移植的重用方案.通过对单元测试脚本的分析和自动翻译方法,将原测试脚本中包含的信息提取出来,解析为基于XML的中间脚本,然后再利用XSLT技术,依据XML记录的信息,自动生成目标框架的单元测试脚本,从而解决单元测试脚本的重用问题.最后实验验证了方案的可行性.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号