摘要
针对类状态测试可能遗漏数据错误问题,利用数据流分析技术对生成的测试序列进行分析,找出数据流异常进而对其改进,能较好地解决数据错误问题。为解决在状态测试执行时需要插装代码来跟踪状态转换以便进行可行性检测分析,以及需要通过改写被测类代码来解决类封装性限制进行类状态验证,导致测试脚本臃肿、强聚合和被测类代码版本不一致问题,提出了一种基于AOP类状态测试执行方法,它通过分离关注点、突破类封装性限制,能有效地解决这些问题。基于上述技术和方法,提出一种类状态测试模型,实例分析和实验结果表明,该模型能较好地实现类状态测试。
Aiming at the problems of data errors may be ignored in class state testing,the generated test sequences is analyzed based on the data flow analysis techniques to find out data flow anomaly and correct.It can solve the problem effectively.The state transitions can be tracked by injecting tracking code into source code in order to analysis the feasibility,and break encapsulation restriction of classes by rewriting the codes of classes to certificate their states.These will lead the test scripts becoming out of bloated,strong aggregation and the version of classes is inconsistent.An innovation class state test execute method based on the AOP is proposed to solve these challenges effectively by separating concerns and breaking the class encapsulation restriction.On the basis of the above technique and method, a class state test model is presented.Case study and experimental results show that the model can achieve better class state tests.
出处
《计算机工程与设计》
CSCD
北大核心
2011年第1期188-191,196,共5页
Computer Engineering and Design