首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 74 毫秒
1.
基于UML活动图模型生成测试场景的设计   总被引:12,自引:0,他引:12  
文章旨在研究运用可视化面向对象建模技术UML中的活动图生成测试场景方法和依据场景进行测试用例自动生成的方法。这种方法不仅适合于软件系统的测试,同时也适用于软件设计阶段的对软件需求和设计模型的测试和验证。文中首先确定一系列覆盖准则,根据准则制定活动图的一般处理思路,然后针对活动图中并发结构、对象流、信号流提出相应处理方法,最后反推出作图的一些假定条件,以及在场景基础上生成测试用例的一些设计构想。  相似文献   

2.
基于UML顺序图的测试场景自动生成研究   总被引:1,自引:0,他引:1  
UML顺序图直观地展现了对象之间的消息动态交互过程,适合于作为面向对象软件交互测试用例生成的依据。本文针对测试用例中的测试场景生成问题进行了研究,在将顺序图转化为消息交互流程图的基础上,根据对象覆盖、消息对覆盖、消息覆盖和逻辑路径覆盖等准则,分别给出了不同的测试场景生成算法,最后探讨了测试场景的健壮性。  相似文献   

3.
提出了一种基于UML状态图的测试场景生成方法。测试场景从状态图的基本转换路径中产生,一条转换路径对应一个测试场景。文中给出了从UML状态图获得基本转换路径的算法。该算法从状态图中的初始状态到终止状态进行遍历,得到所有的基本转换路径,根据环路复杂度可得到状态图的基本路径的最大数量,即测试场景的最小数量。根据测试场景设计测试用例,可生成较少而有效的测试用例。  相似文献   

4.
本文研究运用统一建模语言(UML)活动图生成测试场景的方法,提出采用McCabe的基路径方法生成测试场景,首先对活动图进行压缩,采用基路径寻找算法找出其中的基本路径,并发活动实例化,替换找出的基本路径,形成完整的路径,据此生成相应的测试场景。文中对UML活动图的语法和语义进行了形式化定义和描述,详细描述了从压缩后的活动图中寻找基本路径的算法,对并发活动进行了约束。该方法所产生的基本路径相对独立,提高了测试效率。  相似文献   

5.
祝玉芬  刘超 《计算机工程》2003,29(21):45-47
给出了测试用例的定义和如何根据UML活动图模型来生成测试用例的基本方法,包括基于活动图模型控制流结构的测试场景生成和针对活动的输入量的测试数据生成。根据活动图模型的层次型特点,引入了针对话动的层次化的测试剖面(Test Profiles)概念和输入输出数据描述规范,用以支持用户在活动图上分层次地提供有关测试数据生成的约束条件。同时,给出了基于测试剖面的基本测试数据的生成方法,以及基于测试场景和基本测试数据的组合来生成一组测试用例的方法。  相似文献   

6.
由于UML模型在设计过程中产生,作为测试模型不需要额外的开支,因此以UML作为测试模型的研究很多.目前的研究方法大多数采用灰盒测试方法[1]对各种模型的条件、节点、方法等进行遍历,得到测试场景.然而在实际中,通过这些方法从UML模型中会得到很多的测试场景,目的就是要对找出的灰盒测试用例进行优先级判断,找出较为重要的测试用例,这些测试用例能为实际的测试过程提供着重测试的依据.  相似文献   

7.
黄陇  于洪敏  陈致明 《计算机工程与设计》2005,26(11):3072-3073,3096
多态性是面向对象软件的一个重要特征。它在增强程序开发的灵活性和代码的复用性的同时,也对软件测试提出了新的挑战。首先提出了基于UML顺序图的测试场景生成算法,然后分析了多态性在测试场景生成过程中的影响,最后给出了针对多态性影响的解决方案。  相似文献   

8.
基于模型的测试用例生成方法已经被软件行业所接受。这种方法的优点在于可以及早地发现缺陷,减少软件开发的时间等等。现在,研究者已经考虑从UML图中获得测试用例。文中介绍了一种从UML2.0活动图中产生测试用例的方法。提出了活动路径覆盖准则,重点分析并发活动的顺序及排列,引入深度优先与广度优先结合的生成算法,避免了测试用例数量爆炸,提高了自动化生成测试用例的可行性,从而为UML活动动图的自动化测试提供了系统的、有效的、可行的方法。  相似文献   

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

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

11.
测试自动化是提高软件测试效率的重要途径。基于UML模型的面向对象软件测试是当前研究的热点。这些研究大都是类或集成测试,对于如何自动生成较为完整、合理的系统测试用例较少。在总结研究现状的基础上,以应用举例的方式提出一种从描述系统用例问顺序依赖关系的活动图和用例实现的活动图中获取系统功能测试线索的方法。  相似文献   

12.
测试用例的自动生成是软件测试研究的主要方向之一。针对现有的UML模型驱动测试方法在测试数据生成方面存在低效、无目的性、冗余等问题,提出了基于UML活动图模型驱动的划分测试用例自动生成方法。该方法将测试场景归为五种类型,并为每种类型规划了测试数据取值范围和选择方法。构建了基于该方法的原型工具软件,提供被测软件原模型和数据约束即可生成测试用例。实验结果表明,该方法能够在不降低测试覆盖率的情况下,能生成数量少、针对性强的测试用例集。  相似文献   

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

14.
The aim of software testing is to find faults in a program under test, so generating test data that can expose the faults of a program is very important. To date, current stud- ies on generating test data for path coverage do not perform well in detecting low probability faults on the covered path. The automatic generation of test data for both path coverage and fault detection using genetic algorithms is the focus of this study. To this end, the problem is first formulated as a bi-objective optimization problem with one constraint whose objectives are the number of faults detected in the traversed path and the risk level of these faults, and whose constraint is that the traversed path must be the target path. An evolution- ary algorithm is employed to solve the formulated model, and several types of fault detection methods are given. Finally, the proposed method is applied to several real-world programs, and compared with a random method and evolutionary opti- mization method in the following three aspects: the number of generations and the time consumption needed to generate desired test data, and the success rate of detecting faults. The experimental results confirm that the proposed method can effectively generate test data that not only traverse the target path but also detect faults lying in it.  相似文献   

15.
The aim of software testing is to find faults in a program under test, so generating test data that can expose the faults of a program is very important. To date, current studies on generating test data for path coverage do not perform well in detecting low probability faults on the covered path. The automatic generation of test data for both path coverage and fault detection using genetic algorithms is the focus of this study. To this end, the problem is first formulated as a bi-objective optimization problem with one constraint whose objectives are the number of faults detected in the traversed path and the risk level of these faults, and whose constraint is that the traversed path must be the target path. An evolutionary algorithmis employed to solve the formulatedmodel, and several types of fault detectionmethods are given. Finally, the proposed method is applied to several real-world programs, and compared with a random method and evolutionary optimization method in the following three aspects: the number of generations and the time consumption needed to generate desired test data, and the success rate of detecting faults. The experimental results confirm that the proposed method can effectively generate test data that not only traverse the target path but also detect faults lying in it.  相似文献   

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

17.
UML状态图的测试用例自动生成   总被引:1,自引:0,他引:1  
现有的研究在对UML状态图生成测试用例时,为简化问题而忽略了对伪状态的支持。针对这一问题,首先对UML状态图的伪状态概念进行分析,并讨论了其对相关测试用例生成算法的影响;改进了UMLstatechart语义对伪状态的定义,对伪状态进行适当的转换,同时扩充现有算法对伪状态的支持;提出了一套可以处理伪状态的UML状态图平坦化算法以及相应的测试用例生成方法,并对实际应用效果进行了验证。  相似文献   

18.
Context:The Unified Modeling Language (UML) has become the de facto standard for software modeling. UML models are often used to visualize, understand, and communicate the structure and behavior of a system. UML activity diagrams (ADs) are often used to elaborate and visualize individual use cases. Due to their higher level of abstraction and process-oriented perspective, UML ADs are also highly suitable for model-based test generation. In the last two decades, different researchers have used UML ADs for test generation. Despite the growing use of UML ADs for model-based testing, there are currently no comprehensive and unbiased studies on the topic.Objective:To present a comprehensive and unbiased overview of the state-of-the-art on model-based testing using UML ADs.Method:We review and structure the current body of knowledge on model-based testing using UML ADs by performing a systematic mapping study using well-known guidelines. We pose nine research questions, outline our selection criteria, and develop a classification scheme.Results:The results comprise 41 primary studies analyzed against nine research questions. We also highlight the current trends and research gaps in model-based testing using UML ADs and discuss some shortcomings for researchers and practitioners working in this area. The results show that the existing approaches on model-based testing using UML ADs tend to rely on intermediate formats and formalisms for model verification and test generation, employ a multitude of graph-based coverage criteria, and use graph search algorithms.Conclusion:We present a comprehensive overview of the existing approaches on model-based testing using UML ADs. We conclude that (1) UML ADs are not being used for non-functional testing, (2) only a few approaches have been validated against realistic, industrial case studies, (3) most approaches target very restricted application domains, and (4) there is currently a clear lack of holistic approaches for model-based testing using UML ADs.  相似文献   

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

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