首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到17条相似文献,搜索用时 995 毫秒
1.
变异测试通过执行变异体评价给定测试用例集的质量。然而,一定比例的等价变异体,不仅增加变异测试成本,也影响测试用例评价结果的准确性。鉴于此,提出基于弱变异分析的方法,以有效检测等价变异体。所提方法将变异前后语句组合为条件语句,以反映杀死变异体的必要性条件,并构造变异分支;将所有变异分支集成到原程序中;通过分析变异分支的可满足性,判定等价变异体。将所提方法用于6个程序的实验,结果表明,所提方法能够有效检测等价变异体。  相似文献   

2.
由于缺乏必要的细节信息,针对Web服务的测试难度较大。文章的方法是将变异算子作用到OWL-S文档上,以得出不同输出为目标,从而生成测试用例。该方法避免了生成大量的变异体以及判定等价变异体,能降低测试成本。在保证其有效性的同时,还可以根据具体的应用来调整变异算子,保证方法的通用性和可扩展性。  相似文献   

3.
张功杰  巩敦卫  姚香娟 《软件学报》2015,26(10):2504-2520
为数众多的变异体产生的高昂测试代价严重影响了变异测试技术在实际程序中的应用.为了大幅度减少弱变异测试中变异体的数量,提出基于统计占优分析的变异体约简方法.该方法首先利用变异前后的语句构造变异分支,并将所有变异分支集成到原程序中,形成新的被测程序;然后,通过统计测试用例对各个变异分支的覆盖信息,确定变异分支之间的占优关系;最后得到非被占优分支集,其对应的变异体就是约简后的变异体.将该方法用于8个程序的测试,结果表明:该方法能够约简平均90%的变异体,从而显著提高了变异测试的效率.  相似文献   

4.
程勇  秦丹  杨光 《计算机应用》2017,37(4):1143-1148
针对JavaScript浏览器兼容性问题缺乏有效的测试方法的问题,基于变异测试技术,对Web应用程序中的JavaScript语言在主流浏览器中的兼容性进行了分析,设计了18个针对浏览器兼容性错误的变异算子并开发了自动化的测试工具Compatibility Mutator。该程序使用抽象语法树(AST)分析JavaScript语法,使用Selenium WebDriver自动调用多个浏览器核心并行执行变异测试。通过对7个广泛使用的JavaScript框架的实验,验证了此方法对每一个框架都能够生成一定数量的变异体,其中对jQuery和YUI框架的变异测试的变异得分分别为43.06%和7.69%,表明了所设计的变异算子能够触发浏览器兼容性方面的错误,并且能够评估测试用例集的完备性。  相似文献   

5.
对导致变异测试高代价的原因之一--测试过程中容易产生数目庞大的变异体进行了研究,提出基于遗传算法聚类的变异体约简方法。把具有相似特征的变异体置于同一簇中,再从每个簇中随机选择一个作为代表,从而实现变异体的约简。实验表明:1)该方法可在不降低构造出的测试用例集的测试充分度的前提下,约简变异体;2)与K-means算法和凝聚型层次聚类算法相比,该方法能够在自动产生合适的聚类数目的同时,具有更优的约简效果。  相似文献   

6.
变异测试:原理、优化和应用   总被引:1,自引:0,他引:1  
变异测试是一种基于缺陷的软件测试技术,在近四十年得到国内外学者的广泛关注,并取得了一些研究成果。对已有的研究工作进行总结,将其分为变异测试原理、优化和应用三个模块。其中在变异测试原理模块中,给出变异测试的基本假设,对变异测试分析流程进行介绍,并对其中的重要概念依次给出定义,从静态检测和动态检测两个角度对等价变异体检测技术进行总结。在变异测试优化模块中,从变异体选择优化和变异体执行优化两个角度对已有研究工作进行总结。在变异测试应用模块中,选择了测试用例集充分性评估、测试用例生成和回归测试三个应用领域,对研究工作进行分类总结。最后对变异测试的未来研究方向进行了展望。  相似文献   

7.
在并行程序测试中,测试输入和线程交互时序是影响并行错误检测的两个关键因素。以缩减并行错误检测的输入空间为目标,给出一种基于变异测试的测试用例最小化算法。首先对并行程序进行研究,选取与并行错误密切相关的9个变异算子,并以此为基础为待测程序生成多种变异体;采用JPF作为线程调度工具来执行测试用例,根据变异评分与平均时间成本对测试用例进行排序,在优化后的测试用例集中选取检测能力不重复的测试用例,从而得到面向并行错误检测的最小测试用例集。实验结果证明,该方法能有效减小测试用例集的规模,并大幅缩短运行时间,从而提高了并行程序的测试效率。  相似文献   

8.
实际测试用例一般不能满足变异测试充分,但遗传算法搜索空间较大,可使用其生成变异测试充分度较高的测试用例集.适应值函数的构造使用分支函数插装法.首先根据杀死弱变异体的必要性条件,构造必要性条件分支函数,插装于源程序中;然后根据可达性条件,构造可达性条件的分支函数并插装.使用基于面向路径的遗传算法来搜索杀死弱变异体的测试用例.将终止条件改为程序最终结果的不同,插装函数不变,生成满足条件的强变异测试用例.对于多重弱变异,按熙可达路径实施等价类划分,每一个等价类采用与单重弱变异相同的方法.实验结果表明,遗传算法可生成杀死各类变异体的测试用例,优于随机生成的测试用例.  相似文献   

9.
变异测试是常用的测试方法之一,变异测试分析的过程中计算开销会比较大,问题主要集中于测试过程中会产生大量的变异体,为了减少变异体的数量,提出用标准粒子群聚类算法进行选择优化,但标准粒子群算法在被测数据量增加到一定数量的时候,它的迭代次数就会增加、收敛速度就会下降。针对以上问题提出基于改进的粒子群算法对变异体进行选择优化。通过对变异体集合进行聚类分区,增强变异体集合的多态性,从而对粒子群算法改进优化。实验结果表明在不影响测试充分度的前提下,使变异体的数量大幅度减少,同时与K-means算法以及标准粒子群算法相比之下,改进后的方法具有更好的优化效果。  相似文献   

10.
介绍基于规约说明的变异算法在测试数据生成中的应用思想,分析不同变异算子与故障类别之间的蕴含关系,把这种算法应用到构件合约变异中,提高了测试数据的有效性,简化了最终测试数据集,克服了传统构件合约变异测试产生大量变异体带来的测试低效性。  相似文献   

11.
在应用基于代数规约测试类时,虽然可以有效解决测试数据生成和测试结果判断这两个测试难题,但是,因为该方法常常随机生成测试数据,会导致对于同一待测试类两次测试会得到不同的测试效果。为克服这个缺陷,提出应用数据变异方法,对已生成的测试用例进行变异。变异测试实验表明:该方法能够有效地改善代数测试方法的测试效果。  相似文献   

12.
巩敦卫  陈永伟  田甜 《软件学报》2016,27(8):2008-2024
并行程序执行的不确定性,增加了测试的复杂性和难度.研究消息传递并行程序的变异测试,提出其弱变异测试转化方法,以提高该程序变异测试的效率.首先,根据消息传递并行程序包含语句的类型和语句变异之后导致的变化构建相应的变异条件语句;然后,将构建好的所有变异条件语句插入到原程序中,形成新的被测程序,从而将原程序的弱变异测试问题转化为新程序的分支覆盖问题.这样做的好处是,能够利用已有的分支覆盖方法解决变异测试问题.将该方法应用于8个典型的消息传递并行程序测试中,实验结果表明,该方法不但是可行的,也是必要的.  相似文献   

13.
Because of the computationally expensive cost of mutation testing, automated system support is indispensable for conducting mutation testing. Mutation systems can be classified into interpretive and noninterpretive, but recent systems are noninterpretive. Weak mutation is a well‐known cost reduction method of mutation testing, but it is not directly applicable to noninterpretive mutation systems. To address the problem and take advantage of the efficiency of weak mutation, this paper presents a combined weak and strong mutation for noninterpretive Java mutation systems. The new term ‘serialmutant’ is defined as a specialized program to conduct weak mutation against all mutants in an execution and report only weakly killed mutants as strong mutation candidates. Then strong mutation is conducted only for those reported mutants. The paper also describes an implementation based on a previous Java mutation tool, MuJava. Method‐level mutation operators for Java are also redesigned. Experimental results show that the proposed approach efficiently improves the mutation cost in a noninterpretive mutation system. Copyright © 2012 John Wiley & Sons, Ltd.  相似文献   

14.
Mutation testing is an effective but costly testing technique. Several studies have observed that some mutants can be redundant and therefore removed without affecting its effectiveness. Similarly, some mutants may be more effective than others in guiding the tester on the creation of high‐quality test cases. On the basis of these findings, we present an assessment of C++ class mutation operators by classifying them into 2 rankings: the first ranking sorts the operators on the basis of their degree of redundancy and the second regarding the quality of the tests they help to design. Both rankings are used in a selective mutation study analysing the trade‐off between the reduction achieved and the effectiveness when using a subset of mutants. Experimental results consistently show that leveraging the operators at the top of the 2 rankings, which are different, lead to a significant reduction in the number of mutants with a minimum loss of effectiveness.  相似文献   

15.
Mutation testing from probabilistic and stochastic finite state machines   总被引:1,自引:0,他引:1  
Specification mutation involves mutating a specification, and for each mutation a test is derived that distinguishes the behaviours of the mutated and original specifications. This approach has been applied with finite state machine based models. This paper extends mutation testing to finite state machine models that contain non-functional properties. The paper describes several ways of mutating a finite state machine with probabilities (PFSM) or stochastic time (PSFSM) attached to its transitions and shows how we can generate test sequences that distinguish between such a model and its mutants. Testing then involves applying each test sequence multiple times, observing the resultant behaviours and using results from statistical sampling theory in order to compare the observed frequency and execution time of each output sequence with that expected.  相似文献   

16.
Mutation testing is a testing technique that has been applied successfully to several programming languages. Despite its benefits for software testing, the high computational cost of mutation testing has kept it from being widely used. Several refinements have been proposed to reduce its cost by reducing the number of generated mutants; one of those is evolutionary mutation testing (EMT). Evolutionary mutation testing aims at generating a reduced set of mutants with an evolutionary algorithm, which searches for potentially equivalent and difficult to kill mutants that help improve the test suite. Evolutionary mutation testing has been evaluated in two contexts so far, ie, web service compositions and object-oriented C++ programmes. This study explores its performance when applied to event processing language queries of various domains. This study also considers the impact of the test data, since a lack of events or the need to have specific values in them can hinder testing. The effectiveness of evolutionary mutation testing with the original test data generators and the new internet of things test event generator tool is compared in multiple case studies.  相似文献   

17.
We study the problem of deriving a test suite with guaranteed fault coverage from a given finite state machine specification with respect to some given user defined faults. We consider the case when an implementation under test can have more states than its specification while user defined faults are implemented in an arbitrary way. We show that our approach can be used for FSM-based incremental and mutation testing and correspondingly we investigate cases that can be used for reducing length of obtained test suites. In some cases, worst-case length of obtained test suite becomes polynomial. Experiments show significant gains is using our approach in comparison to testing the whole specification.  相似文献   

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

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

京公网安备 11010802026262号