节点文献
基于功能对象的测试用例生成模型研究与实现
Research on Model of Automated Test Case Generation Based on Functional Object and Its Implementation
【作者】 吕格峰;
【作者基本信息】 湖南大学 , 计算机应用技术, 2005, 硕士
【摘要】 测试用例的自动生成是软件测试的一个重要方面,测试用例生成的复杂度与质量直接影响测试的效率和覆盖面,可以说测试用例生成技术已经成为了软件测试的灵魂。 已有的针对功能测试的自动测试理论主要分为两类:基于规约的测试用例生成方案和基于GUI信息的测试用例生成方案。基于规约的测试用例生成方案将被测试软件的功能以形式化语言描述,根据形式化语言的谓词逻辑关系,推导出程序输入和输出之间的约束关系,再利用数学方法得到软件输入域,根据相应测试理论得到测试用例,如基于Z规格和基于UML规约的测试用例自动生成技术就是采用这种方案,这种方案的主要不足是没有考虑软件的界面状态信息,因此在生成具有复杂界面状态软件的测试用例时由于复杂度大而难以实现;而基于GUI的测试用例生成技术主要考虑的是软件界面状态信息,以界面状态的约束关系作为测试用例的生成准则,以界面覆盖率作为测试用例的主要评价标准。这种方法的主要不足是片面的强调了界面状态的覆盖率而忽略了软件的功能意义,因此造成了生成的测试用例的质量不理想,测试效率较低。 本项研究以国家863基础类研究课题“三维数字化设计系统自动测试技术研究与系统实现(课题编号:2002AA411510)”为背景,研究和分析了已有的基于功能测试的测试用例生成方案,借鉴相应的GUI测试和覆盖准则,以脚本测试技术为基础,提出了一个针对具有复杂人机交互软件系统的测试用例生成模型—基于功能对象的测试用例生成模型,该模型采用面向对象的思想,将用户使用被测试系统的操作流程以功能为单位进行拆分,封装成为功能对象,再以功能之间的约束关系作为组合准则对功能对象进行重组,形成测试用例驱动被测试系统进行测试。这种模型改善了一般的规约模型难于应用到面向对象(OO)软件的缺点,又避免了一般的GUI测试准则片面追求界面覆盖率的弊端,在一定程度上简化了交互式软件的测试用例生成。本文提出的测试用例生成模型,已在三维数字化设计系统的专用测试平台CADTesting中成功实现,目前CADTesting已运用到了国产三维数字化设计系统TiGems的测试中,为TiGems系统在运行的稳定性、可靠性方面做出了一定贡献。
【Abstract】 The automated test case generation is an important aspect of software test. The complexity and quality of test cases affects test efficiency and overlay of the test process,so it is valuable to research on the test case generation in software testing.Existing automated test case generation theory and technology of function testing can be divided into two categories: one is based on GUI information, the other is based on specifications. The former technology describes functions of software as formalized language, induces the relationship between input and output according to predication relation of the formalized language. And then it employs mathematic method to determine the input set to get test cases by pertinent test theories, for example Z-language and UML test case generation method. The main defect of this method is that it dosn’t associate with the GUI information of the software, so it is difficult to generates test cases for the software which contains complex GUI. The criteria of the latter is based on restrict relationship among GUIs and evaluation of the latter criteria is based on GUI coverage. It mainly associates with GUI information and neglect the software functions to some extent, so the quality and test efficiency of the test cases is not great.Our research is supported by a national 863 research project - "Research on Automated Test Technology for 3-Dimensions CAD Systems and System Implementation"(Project No: 2002AA411510). In this thesis, we analyze existing test case generation theories and propose a model of software testing based on script technique. The testing modal is used to analyze user’s operating stream and encapsulate the operating stream to functional object with object-oriented theory, then link the functional object with some restriction to generate test case. This model has improved existing testing models which are hard to apply to Object-Oriented software. And it also avoids the defect of existing GUI test technology which only associate with GUI coverage. This testing model has been successfully applied to the CADTesting which is a special testing platform for CAD system. CADTesting has been applied to the testing process of TiGemsi and make some contributions.
【Key words】 Software Testing; GUI Testing; Test Case; Functional Object;
- 【网络出版投稿人】 湖南大学 【网络出版年期】2005年 07期
- 【分类号】TP311.52
- 【被引频次】2
- 【下载频次】290