首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到17条相似文献,搜索用时 125 毫秒
1.
使用UML生成场景测试用例,有利于测试者设计测试用例。使用UML的类图、状态图和顺序图来说明DHCP实例的场景测试用例的生成方法,讨论基于UML顺序图生成场景测试用例的方法,从找出场景到生成测试用例,分析与每一个场景相关的环境条件并将它与方法序列、输入、输出合理组合作为覆盖该场景的测试用例。结果表明,该方法生成的测试用例数量少,减少了测试工作量和测试用例的重复生成。  相似文献   

2.
本文提出了一个基于UML顺序图的场景测试方法,它以UML顺序图为主要测试模型,结合类图和状态图生成所有的测试场景,然后找到与每一场景相关的环境条件并将它与方法序列、输入、输出合理组合作为覆盖该场景的测试用例。该方法完全基于UML,而且生成的测试用例数量少,减少了测试工作量。  相似文献   

3.
文瑾 《集成技术》2013,2(3):75-78
首先在分析 UML 模型可测试性的基础上,解析顺序图,得到场景测试树,再遍历该树,得到场景的输入、预期 输出、约束条件以及场景环境,这 4 部分组成了测试用例。再通过比较 UML 设计修改前后两个版本的顺序图,找出其中 的改变信息,并在测试用例和变化信息间建立映射关系,最后从原测试用例组中挑选出与映射关系有关的测试用例。  相似文献   

4.
一个基于UML顺序图的场景测试用例生成方法   总被引:2,自引:0,他引:2  
UML顺序图是基于UML开发的软件设计模型的重要组成部分,它描述了软件系统的动态行为,是软件集成测试过程中的一个重要的信息来源。本文提出了一个基于UML顺序图的场景测试方法,它以UML顺序图为主要测试模型,结合UML状态图和类图生成所有的测试场景,最后使用范畴一划分方法找到与每一场景相关的环境条件并将它与方法序列、输入、输出合理组合作为覆盖该场景的测试用例,用于测试该场景中对象之间的交互。由于UML已广泛用于软件分析和设计阶段,通过UML模型生成测试用例可充分利用已有的设计结果,减少测试阶段所需的费用,对于已使用UML的工业界有着重要的意义。  相似文献   

5.
冯秋燕 《计算机应用》2014,34(1):276-280
采用基于UML模型的软件测试方法,主要整合用例图与顺序图进行系统级的软件测试。首先提出用例执行图(UEG)的生成算法、顺序执行图(SEG)的生成算法,及基于UEG和SEG,生成系统测试图(STG)的算法;其次,根据制定的三层次准则,遍历UEG、SEG、STG生成测试用例,主要解决交互错、场景错、用例执行错和用例依赖错等问题。最后,经实例分析和实验验证,该方法可以基于用例图和顺序图进行系统级的软件测试。  相似文献   

6.
针对面向对象软件的类、封装、继承、动态连接等特性,对对象建模语言(UML模型)中的顺序图添加对象约束语言(OCL约束),做类间交互的软件测试。提出执行图EG生成算法,将顺序图SD转换为EG,解决UML2.0顺序图新增特性中的alt,loop,opt,break这4种常见组合片段及其嵌套和多态性问题;为得到最小完备的测试路径,提出EG的遍历策略和测试路径生成算法;确定测试场景,生成测试用例。经实例分析,它可以基于UML顺序图与OCL作系统地测试。  相似文献   

7.
采用基于UML模型的软件测试方法,主要整合用例图与顺序图进行系统级的软件测试。首先提出用例执行图(UEG)的生成算法、顺序执行图(SEG)的生成算法,及基于UEG和SEG,生成系统测试图(STG)的算法;其次,根据制定的三层次准则,遍历UEG、SEG、STG生成测试用例,主要解决交互错、场景错、用例执行错和用例依赖错等问题。最后,经实例分析和实验验证,该方法可以基于用例图和顺序图进行系统级的软件测试。  相似文献   

8.
为实现测试用例的自动生成,提出一种基于场景的测试用例生成方法.首先分解被测软件系统,根据分解后的系统,建立系统场景模型.重点分析了测试场景的提取,给出了顺序、平行以及循环三种分解图结构的测试场景生成算法.最后给出了从测试场景到测试用例的转换算法.  相似文献   

9.
基于UML活动图的测试用例自动生成方法研究   总被引:9,自引:0,他引:9  
牟凯  顾明 《计算机应用》2006,26(4):844-846
基于UML活动图对系统测试的方法进行研究。针对活动图半形式化特性,给出了活动图的形式化描述及测试覆盖准则的定义。重点分析并发活动的顺序及排列,引入人机动态交互的方法在测试场景生成算法上加以约束,避免了测试场景集数量爆炸,使自动化生成测试用例可行性有一定提高。最后,讨论了从测试场景到测试用例的方法,从而为UML活动图的自动化测试提供了系统的、有效的、可行的方法。  相似文献   

10.
基于动态切片和UML图的回归测试用例生成   总被引:2,自引:0,他引:2  
针对基于UML设计的面向对象软件在修改后进行回归测试的情况,提出一种回归测试用例生成的新方法。获取软件修改后进行回归测试时必须重新测试的类和方法,分析与需要重测试类有关的UML顺序图,对顺序图中每个包含不等关系的条件断言生成与其有关的动态程序切片,根据该动态程序切片生成与其相应的回归测试用例。  相似文献   

11.
Due to the large size and complexity of software, exhaustive testing becomes impossible. Hence, testing must be done in an optimized way keeping in mind factors, such as requirements of the customer, cost and time. For this, there is a need to generate test cases and exercise them to gain maximum throughput by uncovering defects. Test case/scenario prioritization is a well known and efficient technique to ensure the software quality. Prioritization of test scenarios helps in early detection of bugs. In this paper, we present an integrated approach and a prioritization technique to generate cluster-level test scenarios from UML communication and activity diagrams. In our approach, we first construct a tree representation of communication diagrams, and then a tree representation of activity diagrams. We convert them into an intermediate tree named as COMMACT tree. We, then carry out a post-order traversal of the constructed tree for selecting conditional predicates from the intermediate tree. Then, we propose an algorithm to generate test scenarios from the constructed tree. Next, the necessary information, such as method-activity sequence, associated objects, and constraint conditions is extracted from test scenario. The test sequences are a set of theoretical paths starting from initialization to end, while taking conditions (pre- and post-condition) into consideration. Each generated test sequence corresponds to a particular scenario of the considered use case. The third phase is to generate test scenarios from the tree satisfying the message–activity path test adequacy criteria. Preliminary results obtained on a case-study indicate that the technique is effective in extracting the critical scenarios from the communication and activity diagrams. Our approach generates redundant test scenarios and still achieves adequate test coverage.  相似文献   

12.
应用UML顺序图的联锁测试用例生成方法   总被引:2,自引:0,他引:2  
计算机联锁软件是安全完善度等级最高的软件, 因此, 在投入使用前对联锁软件的测试是必不可少的。为生成联锁软件测试用例, 结合包含有充分测试信息的UML模型, 提出一种以UML顺序图为主要模型的软件测试用例生成方法。通过提出有向图SG生成算法, 将顺序图转换为SG; 然后基于特定的覆盖准则和采用深度优先搜索算法遍历SG, 得到场景的输入、预期输出、约束条件以及场景环境, 生成测试用例; 最后, 以进路建立过程为例验证了该方法的可行性和正确性。  相似文献   

13.
提出了一种新颖的基于UML图自动生成系统测试用例的方法.此方法适用于所有UML建模的系统.用创新性地结合图论知识,对用例图和序列图进行抽象,定义了相应的测试覆盖准则以生成测试用例.通过两级遍历,自动生成系统测试向最,并且达到所提的系统测试覆盖率的要求.能够覆盖所有用例、用例依赖性、以及交互中所有的消息序列.实现最大化的...  相似文献   

14.
This paper presents an approach to generate test cases from UML 2.0 sequence diagrams and subsequently prioritize those test cases using model information encapsulated in the sequence diagrams. The test cases generated according to the proposed approach satisfy the scenario coverage criterion and are suitable for system‐level testing. For prioritizing test cases, three different prioritization metrics are proposed. The values of these prioritization metrics can be analytically computed from the model information only. This paper also presents an approach to generate test data using a concept called rule‐based matrix. The prioritization metrics are used to control the number of test data without compromising the test adequacy. The effectiveness of the proposed approach has been verified using two industrial designs. Copyright © 2009 John Wiley & Sons, Ltd.  相似文献   

15.
UMLTGF:一个基于灰盒方法从UML活动图生成测试用例的工具   总被引:8,自引:0,他引:8  
UML已经成为建模语言的事实标准,如何从UML分析设计模型生成测试用例也为面向对象软件测试带来了新的挑战.为了从UML设计模型中的活动图直接生成测试用例,给出了UML活动图的形式化定义和灰盒测试方法.该方法首先分析UML活动图上的所有执行路径(每条路径称为一个测试场景),然后根据测试场景中的节点和转换所代表的活动及其输入/输出变量、相关约束条件等生成测试用例.并根据该方法实现了一个自动生成测试用例的工具UMLTGF,它可以从Rational Rose的规约文件中提取活动图信息并生成相应的测试用例.该工具能够提高软件测试的效率,降低测试成本.  相似文献   

16.
Constraint diagrams are a diagrammatic notation which may be used to express logical constraints. They generalize Venn diagrams and Euler circles, and include syntax for quantification and navigation of relations. The notation was designed to complement the Unified Modelling Language in the development of software systems.Since symbols representing quantification in a diagrammatic language can be naturally ordered in multiple ways, some constraint diagrams have more than one intuitive meaning in first-order predicate logic. Any equally expressive notation which is based on Euler diagrams and conveys logical statements using explicit quantification will have to address this problem.We explicitly augment constraint diagrams with reading trees, which provides a partial ordering for the quantifiers (determining their scope as well as their relative ordering). Alternative approaches using spatial arrangements of components, or alphabetical ordering of symbols, for example, can be seen as implicit representations of a reading tree.Whether the reading tree accompanies the diagram explicitly (optimizing expressiveness) or implicitly (simplifying diagram syntax), we show how to construct unambiguous semantics for the augmented constraint diagram.  相似文献   

17.
We present a method to generate cluster level test cases based on UML communication diagrams. In our approach, we first construct a tree representation of communication diagrams. We then carry out a post-order traversal of the constructed tree for selecting conditional predicates from the communication diagram. We transform the conditional predicates on the communication diagram and apply function minimization technique to generate the test data. The generated test cases achieve message paths coverage as well as boundary coverage. We have implemented our technique and tested it on several example problems.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

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