首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
Developers have learned over time that software testing costs a considerable amount of a software project budget. Hence, software quality managers have been looking for solutions to reduce testing costs and time. Considering path coverage as the test adequacy criterion, we propose using genetic algorithms (GA) for automating the generation of test data for white-box testing. There are evidences that GA has been already successful in generating test data. However, existing GA-based test data generators suffer from some problems. This paper presents our approach to overcome one of these problems; that is the inefficiency in covering multiple target paths. We have designed a GA-based test data generator that is, in one run, able to synthesize multiple test data to cover multiple target paths. Moreover, we have implemented a set of variations of the generator. Experimental results show that our test data generator is more efficient and more effective than others.  相似文献   

2.
Software testing is both a time and resource-consuming activity in software development. The most difficult parts of software testing are the generation and prioritization of test data. Principally these two parts are performed manually. Hence introducing an automation approach will significantly reduce the total cost incurred in the software development lifecycle. A number of automatic test case generation (ATCG) and prioritization approaches have been explored. In this paper, we propose two approaches: (1) a pathspecific approach for ATCG using the following metaheuristic techniques: the genetic algorithm (GA), particle swarm optimization (PSO) and artificial bee colony optimization (ABC); and (2) a test case prioritization (TCP) approach using PSO. Based on our experimental findings, we conclude that ABC outperforms the GA and PSO-based approaches for ATC.G Moreover, the results for PSO on TCP arguments demonstrate biased applicability for both small and large test suites against random, reverse and unordered prioritization schemes. Therefore, we focus on conducting a comprehensive and exhaustive study of the application of metaheuristic algorithms in solving ATCG and TCP problems in software engineering.  相似文献   

3.
《Applied Soft Computing》2008,8(2):849-857
Heuristic optimization provides a robust and efficient approach for solving complex real-world problems. The focus of this research is on a hybrid method combining two heuristic optimization techniques, genetic algorithms (GA) and particle swarm optimization (PSO), for the global optimization of multimodal functions. Denoted as GA-PSO, this hybrid technique incorporates concepts from GA and PSO and creates individuals in a new generation not only by crossover and mutation operations as found in GA but also by mechanisms of PSO. The results of various experimental studies using a suite of 17 multimodal test functions taken from the literature have demonstrated the superiority of the hybrid GA-PSO approach over the other four search techniques in terms of solution quality and convergence rates.  相似文献   

4.
基于改进粒子群算法的测试数据自动生成研究   总被引:1,自引:1,他引:1  
测试数据的自动产生技术是软件测试的一个重要研究领域,高效的测试数据乍成可以简化测试工作提高测试效率;针对传统遗传算法(GA)容易产生早熟收敛和易陷入局部最优解的问题,提出了一种基于遗传粒子群混合算法(GA-PSO)的软件测试数据自动生成算法,该算法在粒子群算法的基础上引入了遗传算子(交叉概率P<,c>、变异概率P<,m>),使所有测试数据在局部区域中再次寻找最优值,从而避免过早收敛,改进搜索最佳值的能力;仿真实验表明遗传粒子群混合算法与单纯使用简单遗传算法相比,具有更快的收敛速度,其产生最优解的代数得以大大提前,且精度更高.  相似文献   

5.
Software testing is essential to guarantee high quality products. However, it is a very expensive activity, particularly when manually performed. One way to cut down costs is by reducing the input test suites, which are usually large in order to fully satisfy the test goals. Yet, since large test suites usually contain redundancies (i.e., two or more test cases (TC) covering the same requirement/piece of code), it is possible to reduce them in order to respect time/people constraints without severely compromising coverage. In this light, we formulated the TC selection problem as a constrained search based optimization task, using requirements coverage as the fitness function to be maximized (quality of the resultant suite), and the execution effort (time) of the selected TCs as a constraint in the search process. Our work is based on the Particle Swarm Optimization (PSO) algorithm, which is simple and efficient when compared to other widespread search techniques. Despite that, besides our previous works, we did not find any other proposals using PSO for TC selection, neither we found solutions treating this task as a constrained optimization problem. We implemented a Binary Constrained PSO (BCPSO) for functional TC selection, and two hybrid algorithms integrating BCPSO with local search mechanisms, in order to refine the solutions provided by BCPSO. These algorithms were evaluated using two different real-world test suites of functional TCs related to the mobile devices domain. In the performed experiments, the BCPSO obtained promising results for the optimization tasks considered. Also, the hybrid algorithms obtained statistically better results than the individual search techniques.  相似文献   

6.
摘 要: 随着软件行业的快速发展,软件测试的作用也越来越大,自动化测试用例生成方法也越来越多。所以如何提出一种高效的测试用例生成算法,一直是测试领域关注的热点。本文提出了一种基于碰撞域检测优化的测试用例生成方法检测优化的测试用例生成方法能规避大量的冗余测试用例产生,因此该算法在短时间内能将代码的语句覆盖度收敛到一个较为满意的值。同时通过半径的动态调整,保证算法的覆盖度逐级上升,结合遗传算法对高覆盖率的测试用例进行交叉变异,快速找到有效的测试用例数据。实验证明,该算法的性能相比于传统随机法有较大的提升,而且参数的范围越大,效果越好。  相似文献   

7.
软件测试是软件工程的一个重要组成部分,其目标是能够及时发现软件中的错误,确保软件高质量。测试用例是软件测试的基础,覆盖度较高且精简的测试用例集可以提高测试效率和降低成本。软件测试覆盖标准较多,一个好的测试用例评价指标也存在多种,为了能够在约简测试用例集规模的同时获取较高的测试能力,本文提出了一种基于多优化目标的测试用例集约简算法,该算法旨在根据测试用例需求,构建多优化目标的测试用例模型,使用该模型获取一个最优解的测试用例子集,使用最小化用例集方法最小化测试用例,迭代执行直到测试用例集覆盖所有的测试需求,实验结果表明该算法可以约简测试用例集,获取较高的综合测试效果。  相似文献   

8.
Test data generation is always a key task in the field of software testing. In recent years, meta-heuristic search techniques have been considered as an effective way to assist test data generation in software structural testing. In this way, some representative test cases with high-coverage capability can be picked out from program input space. Harmony search (HS) is a recently developed algorithm and has been vigorously applied to various optimization problems. In the paper, we attempt to apply harmony search algorithm to generate test data satisfying branch coverage. At the preprocessing stage, the probes used for gathering coverage information are inserted into all branches via program static analysis. At the same time, the encoding and decoding styles between a test case and a harmony are also determined in advance. At the stage of test data searching, the subset of test data that has much stronger covering ability is stored in harmony memory. During the evolution process, one part of test suite is selected and adjusted from the harmony memory, and the other part is randomly generated from input space. Once a test suite is yielded after one-round search, its coverage can be measured by fitness function in our search algorithm. In our work, a new fitness function for branch coverage is constructed by comprehensively considering branch distance and branch weight. Here, the branch weight is determined by branch information in program, that is, the nesting level of a specific branch and the predicate types in it. Subsequently, the computed coverage metric is used for updating the test suite in the next round of searching. In order to validate the effectiveness of our proposed method, eight well-known programs are used for experimental evaluation. Experimental results show that the coverage of HS-based method is usually higher than those of other search algorithms, such as simulated annealing (SA) and genetic algorithm (GA). Meanwhile, HS demonstrates greater stability than SA and GA when varying the population size or performing repeated trials. That is to say, music-inspired HS algorithm is more suitable to generate test data for branch coverage in software structural testing.  相似文献   

9.
深度学习软件的结构特征与传统软件存在明显差异,因此即使展开了大量测试,依然无法有效衡量测试数据对深度学习软件的覆盖情况和测试充分性,并造成后续使用过程中依然可能存在大量未知错误.深度森林是一种新型深度学习模型,其克服了深度神经网络存在的一些缺点,例如:需要大量训练数据、需要高算力平台、需要大量超参数.但目前还没有相关工作对深度森林的测试方法进行研究.针对深度森林的结构特点,制定了一组由随机森林结点覆盖率RFNC、随机森林叶子覆盖率RFLC、级联森林类型覆盖率CFCC和级联森林输出覆盖率CFOC组成的测试覆盖率评价指标.在此基础上,基于遗传算法设计了覆盖制导的测试数据自动生成方法DeepRanger,可自动生成能有效提高模型覆盖率的测试数据集.为对所提出覆盖指标的有效性进行验证,在深度森林开源项目gcForest和MNIST数据集上设计并进行了一组实验.实验结果表明,所提出的4种覆盖指标均能有效评价测试数据集对深度森林模型的测试充分性.此外,与基于随机选择的遗传算法相比,使用覆盖信息制导的测试数据生成方法 DeepRanger能达到更高的模型覆盖率.  相似文献   

10.
基于GA-PSO算法的路径测试数据自动生成*   总被引:5,自引:2,他引:3  
为了实现测试数据自动生成,许多遗传算法及其改进算法应用到了测试领域。针对遗传算法具有较强的全局搜索能力,但局部搜索能力较弱,且收敛速度慢的特点。将遗传算法与粒子群算法结合起来形成新的混合算法(GA-PSO),并成功应用到软件测试数据自动生成过程中。实验结果表明,该算法结合了遗传算法和粒子群算法的优点,在保证软件测试数据正确生成的情况下,极大地提高了数据生成的效率。  相似文献   

11.
软件测试是软件质量保证的重要手段,测试用例自动生成一直是被广泛研究的问题。本文在分析了遗传算法、粒子群算法和蚁群算法的优缺点后,在软件测试用例的自动生成过程中采用一种新改进的粒子群算法。该算法将蚁群算法的信息素机制引入到粒子群算法中,加大了粒子间的多样性,有效地克服了粒子群算法容易发生早熟停滞的缺陷。最后通过仿真实验证明了算法应用于软件测试的可行性和高效性。  相似文献   

12.
软件测试是保证软件质量和可靠性的重要手段,如何对软件进行全面且高效的测试一直是备受关注的问题。分析了白盒测试与黑盒测试的优缺点;具体分析了最小测试用例生成算法,接着对生成最小测试用例集的方法提出改进:首先消除掉测试需求中存在的冗余,再对由该测试需求生成的测试用例集使用简化算法,得到一组无冗余的测试用例集。这种先对测试需求进行精简的方法,使得测试用例集中测试用例的数量大为减少,提高了简化算法的使用效率。将上述最小测试用例集生成方法运用到Apla到delphi生成器系统的测试中,提高了测试效率。  相似文献   

13.
This work presents particle swarm optimization (PSO), a collaborative population-based meta-heuristic algorithm for solving the Cardinality Constraints Markowitz Portfolio Optimization problem (CCMPO problem). To our knowledge, an efficient algorithmic solution for this nonlinear mixed quadratic programming problem has not been proposed until now. Using heuristic algorithms in this case is imperative. To solve the CCMPO problem, the proposed improved PSO increases exploration in the initial search steps and improves convergence speed in the final search steps. Numerical solutions are obtained for five analyses of weekly price data for the following indices for the period March, 1992 to September, 1997: Hang Seng 31 in Hong Kong, DAX 100 in Germany, FTSE 100 in UK, S&P 100 in USA and Nikkei 225 in Japan. The test results indicate that the proposed PSO is much more robust and effective than existing PSO algorithms, especially for low-risk investment portfolios. In most cases, the PSO outperformed genetic algorithm (GA), simulated annealing (SA), and tabu search (TS).  相似文献   

14.
基于退火免疫遗传算法的测试用例生成研究   总被引:2,自引:0,他引:2  
在软件测试技术中,高效的测试用例生成是简化测试工作、提高测试效率的必要手段.提出了一种应用于软件测试中的基于退火免疫遗传算法(AIGA)的测试用例自动生成算法,介绍了AIGA测试用例生成模型和AIGA算法的基本思想.算法融合了模拟退火算法和免疫算法在避免陷入局部最优和保持种群多样性方面的优势,克服遗传算法局部搜索能力差及其早熟现象和模拟退火算法全局搜索能力差、效率不高的问题.实验结果表明,算法在测试用例自动生成的效率和效果方面.优于传统遗传算法.  相似文献   

15.
针对路径测试中的软件测试用例生成的问题,提出了一种基于改进PSO算法的软件测试用例生成方法。首先,采用分值函数叠加方法来构造PSO算法中的适应度函数,并对粒子位置更新策略进行改进。接着,构建算法的控制流程图并进行目标路径选择。然后,利用程序插装收集个体的适应度值。最后,测试数据生成程序执行,得到合适的测试数据。通过在三角形分类判别案例程序上的实验结果表明,提出的软件测试用例生成方法能够生成更合适的测试用例,且有效减少了生成所需时间。  相似文献   

16.
Software testing is a critical and important stage of the application software development life-cycle. Testing is a verification activity that affects the overall software quality. The verification of critical and dependable computer software such as real-time safety-critical software systems consumes about 50% of the project time. In this work, we consider testing compilers. Since a compiler is a highly usable software, an increased emphasis on reliability requires a careful testing before releasing the compiler. In compiler testing, the compiler implementation is verified to conform to the specified language syntax and semantic available in the standard language documentation. In this work, an algorithm is designed and a tool is developed to automate the generation of test cases to check the language syntax. In addition, we propose a heuristic approach to cover language semantics. Since Java is a relatively new programming language, we concentrate on testing the adherence of new Java compilers to the language syntax and semantics.  相似文献   

17.
基于程序执行状态图的软件测试方法研究   总被引:6,自引:1,他引:6  
软件测试一直是保证软件质量的最主要的手段之一,多年来人们一直在寻找好的测试方法和测试策略。同时随着图形界面的日益流行,传统的测试方法变得难以适应测试的需要。文章提出了一种基于程序执行状态图PESC的软件测试方法,给出了程序执行状态图的定义,以及相应的覆盖准则。最后,文章介绍了使用PESC逐步生成测试路径的方法。  相似文献   

18.
有效降低测试成本是软件测试优化的重要研究问题。将遗传算法引入到软件测试中,对生成测试场景提供了必要的动力,然而遗传算法局域搜索能力差,在进化后期搜索效率低,导致算法比较费时。基于UML活动图提出了混合遗传算法生成测试场景的方法,该方法结合遗传算法和爬山法,有效地加快了测试场景的生成速度。为了避免局部性问题,在算法每次进行爬山操作之前调用种群生成函数。实验结果表明,与简单的遗传算法相比,混合遗传算法不仅有效地解决了局部性问题,而且较大地提高了生成测试场景的效率,降低了软件测试成本。  相似文献   

19.
基于PSO的软件结构测试数据自动生成方法   总被引:5,自引:0,他引:5       下载免费PDF全文
测试数据自动生成是软件测试过程中一个关键的问题。现有的结构测试数据自动生成,多采用基于遗传算法的方法。这些方法存在算法复杂、参数不易设置问题。该文提出一种基于粒子群算法的软件结构测试数据自动生成方法,以分支函数叠加法作为适应值函数。针对三角形判别程序的结构测试数据生成实验结果表明,与基于遗传算法的方法相比,可以更高效地生成测试数据,在粒子数目与种群个数相同的情况下,生成所需测试数据的迭代次数仅是遗传算法的1/16左右。  相似文献   

20.
Software testing is one of the most inevitable processes in software development. The field of software testing has seen an extensive use of search based techniques in the last decade. Among the search based techniques, it is the metaheuristic techniques such as genetic algorithm that has garnered the major share of attention from researchers. Looking at the large body of work that has happened and is happening in this field, we feel that it is high time someone studied how well genetic algorithm based techniques fare in practical testing process. Method: In this work, we present a roadmap to the future of genetic algorithm based software testing, based on a review of literature. We have mainly reviewed the works which use genetic algorithm for software test data generation. This independent review is designed to direct the attention of future researchers to the deficiencies of genetic algorithm based testing, their possible solutions and the extent to which they are correctable. The observations from the selected primary studies highlight the issues faced when genetic algorithm is applied in software testing. The observations form the review reveal that the type of genetic algorithm used, fitness function design, population initialization and parameter settings does impact the quality of solution obtained in software testing using genetic algorithm. From the review we conclude that, more generalized approaches can make genetic algorithm based software testing one of the strongest methods in practical software testing. We hope that, this review will be a major breakthrough in genetic algorithm based software testing field.  相似文献   

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

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