首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 93 毫秒
1.
Unified Modeling Language (UML) activity diagrams are widely used to model concurrent interaction among multiple objects. In this paper, we propose a transformation‐based approach to generating scenario‐oriented test cases for applications modeled by UML activity diagrams. Using a set of transformation rules, the proposed approach first transforms a UML activity diagram specification into an intermediate representation, from which it then constructs test scenarios with respect to the given concurrency coverage criteria. The approach then finally derives a set of test cases for the constructed test scenarios. The approach resolves the difficulties associated with fork and join concurrency in the UML activity diagram and enables control over the number of the resulting test cases. We further implemented a tool to automate the proposed approach and studied its feasibility and effectiveness using a case study. Experimental results show that the approach can generate test cases on demand to satisfy a given concurrency coverage criterion and can detect up to 76.5% of seeded faults when a weak coverage criterion is used. With the approach, testers can not only schedule the software test process earlier, but can also better allocate the testing resources for testing concurrent applications. Copyright © 2015 John Wiley & Sons, Ltd.  相似文献   

2.
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.  相似文献   

3.
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.  相似文献   

4.
基于场景模式的嵌入式软件测试用例设计   总被引:2,自引:0,他引:2       下载免费PDF全文
将场景和模式方法用于嵌入式软件测试用例的设计与生成,通过对被测软件系统需求进行分析建模,将建立的场景模型划分到不同的场景模式中,依据场景模式构建测试场景的状态图,遍历场景状态图以获取测试执行路径,确定相关的测试数据,设计并生成测试用例。实验结果证明,该方法可以较快地设计和生成测试用例,提高测试用例的可重用性,实现对嵌入式软件的有效测试。  相似文献   

5.
Selecting a Cost-Effective Test Case Prioritization Technique   总被引:1,自引:0,他引:1  
Regression testing is an expensive testing process used to validate modified software and detect whether new faults have been introduced into previously tested code. To reduce the cost of regression testing, software testers may prioritize their test cases so that those which are more important, by some measure, are run earlier in the regression testing process. One goal of prioritization is to increase a test suite's rate of fault detection. Previous empirical studies have shown that several prioritization techniques can significantly improve rate of fault detection, but these studies have also shown that the effectiveness of these techniques varies considerably across various attributes of the program, test suites, and modifications being considered. This variation makes it difficult for a practitioner to choose an appropriate prioritization technique for a given testing scenario. To address this problem, we analyze the fault detection rates that result from applying several different prioritization techniques to several programs and modified versions. The results of our analyses provide insights into which types of prioritization techniques are and are not appropriate under specific testing scenarios, and the conditions under which they are or are not appropriate. Our analysis approach can also be used by other researchers or practitioners to determine the prioritization techniques appropriate to other workloads.  相似文献   

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

7.
人工测试方法的缺点是成本高、可靠性低和效率低.基于模型的软件测试方法能够提高测试自动化水平,避免人工测试的缺点.然而,自动化方法的缺点是处理模型中各种图形元素的能力有限,适用范围小.针对现有智能算法不能生成UML活动图循环嵌套结构的测试场景,设计系统循环体数据结构和循环嵌套结构的场景生成算法.该算法提高了解析活动图的能力,扩大了算法的适用范围.论文最后给出了上海轨道交通六号线的测试项目中的一个活动图实例,生成其XML文档,利用改进的反蚁群算法解析XML文档,生成该活动图的细-线程树,验证了该算法的有效性.  相似文献   

8.
基于UML活动图的测试研究进展   总被引:2,自引:0,他引:2  
UML活动图不再是状态图的特例,它作为一种独立的模型广泛用于软件的行为建模.基于UML活动图的测试受到业界的普遍欢迎.然而从UML活动图自动生成完整的测试场景\用例成为一个难点.本文对基于UML活动图的测试进行了比较分析,总结了几种从UML活动图生成测试场景\用例的方法及其使用的算法,即反蚂蚁Agent方法、灰盒方法、自适应细菌Agent方法和系统的形式化方法.对这些方法进行了分析与比较,指出一些不足之处.最后对UML活动图测试的发展趋势做了一些展望.  相似文献   

9.
Often system developers follow Unified Modeling Language (UML) activity diagrams to depict all possible flows of controls commonly known as scenarios of use cases. Hence, an activity diagram is treated as a useful design artifact to identify all possible scenarios and then check faults in scenarios of a use case. However, identification of all possible scenarios and then testing with activity diagrams is a challenging task because several control flow constructs and their nested combinations make path identification difficult. In this paper, we address this problem and propose an approach to identify all scenarios from activity diagrams and use them to test use cases. The proposed approach is based on the classification of control constructs followed by a transformation approach which takes into account any combination of nested structures and transforms an activity diagram into a model called Intermediate Testable Model (ITM). We use ITM to generate test scenarios. With our approach it is possible to generate more scenarios than the existing work. Further, the proposed approach can be directly carried out using design models without any addition of testability information unlike the existing approaches.  相似文献   

10.

In software maintenance, after modifying the software a system needs regression testing. Execution of regression testing confirms that any modified code has no adverse effect as well as does not introduce new faults in the existing functionality of the software. When working with object-oriented programming code-based testing is generally expensive. In this study, we proposed a technique for regression testing using unified modeling language (UML) diagrams and code-based analysis for object-oriented software. In this research work, the design and code based technique with an evolutionary approach are presented to select the best possible test cases from the test suite. We used the dependency graph for intermediate representation for the objectoriented program to identify the change. The selection of test cases is done at the design level using the UML model. The models are compared to identify the change between these two models. The proposed approached maximizes the value of APFD.

  相似文献   

11.
Software test adequacy criteria are rules to determine whether a software system has been adequately tested. A central question in the study of test adequacy criteria is how they relate to fault detecting ability. We identify two idealized software testing scenarios. In the first scenario, which we call prior testing scenario, software testers are provided with an adequacy criterion in addition to the software under test. The knowledge of the adequacy criterion is used to generate test cases. In the second scenario, which we call posterior testing scenario, software testers are not provided with the knowledge of adequacy criterion. The criterion is only used to decide when to stop the generation of test cases. In 1993, Frankl and Weyuker proved that the subsume relation between software test adequacy criteria does not guarantee better fault detecting ability in the prior testing scenario. We investigate the posterior testing scenario and prove that in this scenario the subsume relation does guarantee a better fault detecting ability. Two measures of fault detecting ability will be used, the probability of detecting faults and the expected number of exposed errors  相似文献   

12.
ContextThe current validation tests for nuclear software are routinely performed by random testing, which leads to uncertain test coverage. Moreover, validation tests should directly verify the system’s compliance with the original user’s needs. Unlike current model-based testing methods, which are generally based on requirements or design models, the proposed model is derived from the original user’s needs in text through domain-specific ontology, and then used to generate validation tests systematically.ObjectiveOur first goal is to develop an objective, repeatable, and efficient systematic validation test scheme that is effective for large systems, with analyzable test coverage. Our second goal is to provide a new model-based validation testing method that reflects the user’s original safety needs.MethodA model-based scenario test case generation for nuclear digital safety systems was designed. This was achieved by converting the scenarios described in natural language in a Safety Analysis Report (SAR) prepared by the power company for licensing review, to Unified Modeling Language (UML) sequence diagrams based on a proposed ontology of a related regulatory standard. Next, we extracted the initial environmental parameters and the described operational sequences. We then performed variations on these data to systematically generate a sufficient number of scenario test cases.ResultsTest coverage criteria, which are the equivalence partition coverage of initial environment, the condition coverage, the action coverage and the scenario coverage, were met using our method.ConclusionThe proposed model-based scenario testing can provide improved testing coverage than random testing. A test suite based on user needs can be provided.  相似文献   

13.
钱巨  王寅  程浩  韦正现 《软件学报》2022,33(5):1711-1735
以数据分发服务(data-distribution service, DDS)为基础架构的新型一体化舰船任务系统在研发模式、结构和应用方面具有特殊特点, 使得其测试相当具有挑战. 基于模型的测试(model-based testing, MBT)是工业系统测试的一种有效方法. 然而, 对于类舰船任务系统, 由于其自身的...  相似文献   

14.
基于UML顺序图的测试用例生成   总被引:1,自引:0,他引:1       下载免费PDF全文
为生成覆盖测试需求的测试用例集,提出一种基于UML顺序图自动生成测试用例的方法。通过分析待测系统的功能用例,对其进行顺序图建模。在基于该顺序图生成测试用例的过程中,对顺序图添加规约条件,解析顺序图,得到场景测试树,再遍历该树,得到场景的输入、预期输出、约束条件以及场景环境,这4部分组成了测试用例,同时对如何处理复杂的顺序图及如何满足测试用例充分性等问题进行分析总结,提出有效的解决策略。  相似文献   

15.
A state-based approach to integration testing based on UML models   总被引:3,自引:0,他引:3  
Correct functioning of object-oriented software depends upon the successful integration of classes. While individual classes may function correctly, several new faults can arise when these classes are integrated together. In this paper, we present a technique to enhance testing of interactions among modal classes. The technique combines UML collaboration diagrams and statecharts to automatically generate an intermediate test model, called SCOTEM (State COllaboration TEst Model). The SCOTEM is then used to generate valid test paths. We also define various coverage criteria to generate test paths from the SCOTEM model. In order to assess our technique, we have developed a tool and applied it to a case study to investigate its fault detection capability. The results show that the proposed technique effectively detects all the seeded integration faults when complying with the most demanding adequacy criterion and still achieves reasonably good results for less expensive adequacy criteria.  相似文献   

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

17.
Test case prioritization reorders test cases from a previous version of a software system for the current release to optimize regression testing. We have previously introduced a technique for test case prioritization using historical test case performance data. The technique was based on a test case prioritization equation, which directly computes the priority of each test case using the historical information of the test case using an equation with constant coefficients. This technique was compared just with random ordering approach. In this paper, we present an enhancement of the aforementioned technique in two ways. First, we propose a new prioritization equation with variable coefficients gained according to the available historical performance data, which acts as a feedback from the previous test sessions. Second, a family of comprehensive empirical studies has been conducted to evaluate the performance of the technique. We have compared the proposed technique with our previous technique and the technique proposed by Kim and Porter. The experimental results demonstrate the effectiveness of the proposed technique in accelerating the rate of fault detection in history-based test case prioritization.  相似文献   

18.
A method for the automatic generation of test scenarios from the behavioral requirements of a system is presented in this paper. The generated suite of test scenarios validates the system design or implementation against the requirements. The approach proposed here uses a requirements model and a set of four algorithms. The requirements model is an executable model of the proposed system defined in a deterministic state-based modeling formalism. Each action in the requirements model that changes the state of the model is identified with a unique requirement identifier. The scenario generation algorithms perform controlled simulations of the requirements model in order to generate a suite of test scenarios applicable for black box testing. Measurements of several metrics on the scenario generation algorithms have been collected using prototype tools.  相似文献   

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

20.
在软件开发过程中,回归测试是一项重要而复杂耗时的工作。测试用例排序技术作为提高测试效率的一种有效手段,是近年的研究热点之一。测试用例排序技术根据测试目标对测试用例进行排序,使得最优的测试用例能够优先执行。同时,各种软件信息的底层结构及关联信息有助于提高测试效率。不同的代码单元在测试过程中拥有不同的测试需求。因此,利用聚类算法能够有效地分析测试用例间的结构信息,从而指导测试用例的排序过程。实验结果表明,新的测试用例排序策略有效地提高了测试用例排序的效果,能够更早地检测到软件错误。  相似文献   

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

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