共查询到19条相似文献,搜索用时 125 毫秒
1.
不可达路径增加了程序的复杂度和冗余度,不可达路径的检测是结构测试中的一个关键问题。提出了一种包含异常处理结构的程序不可达路径的静态检测方法。该方法根据数据流信息判断产生冲突的分支,进而利用分支冲突检测路径的可达性;在数据流分析时考虑异常处理结构和变量别名对数据流信息的影响。实例分析结果表明,该方法可以进一步提高路径可达性检测的准确度。 相似文献
2.
给出一种生成分支覆盖测试路径集的改进算法,降低了不可行路径出现的概率,并在此基础上设计实现了一个面向分支覆盖的测试路径自动生成系统AGTP.通过实例验证了算法及系统的有效性,测试结果表明该系统能精确有效地生成分支测试路径集. 相似文献
3.
4.
5.
设计了一个通用的基于控制流和数据流的结构测试数据自动生成的工具。该工具根据控制流和数据流测试中所采用的覆盖标准来选取测试路径,并以改进后的迭代松弛法为核心,对所选取的路径生成测试数据。同时工具采用Fibonacci法优化选取路径,对不可达路径进行处理,并对测试数据的分支覆盖率、DCP覆盖率等进行了统计。实验结果表明该工具是可行的。 相似文献
6.
通过构造新的程序流图,利用Fibonacci法优化选取路径.为指定的分支生成测试数据。提出了路径测试数据生成代价的概念,并给出了代价的计算方法。当所选路径的分支谓词均为线性表达式时,直接求解线性约束集即可生成测试数据,或判定路径不可行;当分支谓词含有非线性表达式时,利用均差近似导数将非线性函数线性化,通过简单的迭代,亦能容易生成测试数据或判定路径在很大程度上不可行。若所选路径不可行或在很大程度上不可行,则选取新的路径,重复以上过程,直至求出所期望的数据,或无新的路径被选取,给定分支不可达。实例和实验表明,算法可行、有效。 相似文献
7.
8.
针对检测缺陷的测试数据生成效率低下问题,提出变异测试和路径覆盖测试技术结合的测试数据生成方法。首先,采用变异测试技术生成的变异分支融入程序,生成新的被测程序;然后,在原路径集中挑选目标路径,通过分析变异分支与路径关联关系,将变异分支融入路径。最后,基于遗传算法生成覆盖路径的测试数据。实验结果表明,多种群遗传算法生成测试数据的时间,比单种群遗传算法节约了41.15%。由此可见,对于覆盖多路径测试数据生成,多种群遗传算法的效率比单种群遗传算法高。 相似文献
9.
实际测试用例一般不能满足变异测试充分,但遗传算法搜索空间较大,可使用其生成变异测试充分度较高的测试用例集.适应值函数的构造使用分支函数插装法.首先根据杀死弱变异体的必要性条件,构造必要性条件分支函数,插装于源程序中;然后根据可达性条件,构造可达性条件的分支函数并插装.使用基于面向路径的遗传算法来搜索杀死弱变异体的测试用例.将终止条件改为程序最终结果的不同,插装函数不变,生成满足条件的强变异测试用例.对于多重弱变异,按熙可达路径实施等价类划分,每一个等价类采用与单重弱变异相同的方法.实验结果表明,遗传算法可生成杀死各类变异体的测试用例,优于随机生成的测试用例. 相似文献
10.
11.
12.
13.
Automated test data generation plays an important part in reducing the cost and increasing the reliability of software testing. However, a challenging problem in path-oriented test data generation is the existence of infeasible program paths, where considerable effort may be wasted in trying to generate input data to traverse the paths. In this paper, we propose a heuristics-based approach to infeasible path detection for dynamic test data generation. Our approach is based on the observation that many infeasible program paths exhibit some common properties. Through realizing these properties in execution traces collected during the test data generation process, infeasible paths can be detected early with high accuracy. Our experiments show that the proposed approach efficiently detects most of the infeasible paths with an average precision of 96.02% and a recall of 100% of all the cases. 相似文献
14.
《Information and Software Technology》2014,56(4):395-407
ContextEvolutionary algorithms have proved to be successful for generating test data for path coverage testing. However in this approach, the set of target paths to be covered may include some that are infeasible. It is impossible to find test data to cover those paths. Rather than searching indefinitely, or until a fixed limit of generations is reached, it would be desirable to stop searching as soon it seems likely that feasible paths have been covered and all remaining un-covered target paths are infeasible.ObjectiveThe objective is to develop criteria to halt the evolutionary test data generation process as soon as it seems not worth continuing, without compromising testing confidence level.MethodDrawing on software reliability growth models as an analogy, this paper proposes and evaluates a method for determining when it is no longer worthwhile to continue searching for test data to cover un-covered target paths. We outline the method, its key parameters, and how it can be used as the basis for different decision rules for early termination of a search. Twenty-one test programs from the SBSE path testing literature are used to evaluate the method.ResultsCompared to searching for a standard number of generations, an average of 30–75% of total computation was avoided in test programs with infeasible paths, and no feasible paths were missed due to early termination. The extra computation in programs with no infeasible paths was negligible.ConclusionsThe method is effective and efficient. It avoids the need to specify a limit on the number of generations for searching. It can help to overcome problems caused by infeasible paths in search-based test data generation for path testing. 相似文献
15.
In general, LCSAJ testing more thoroughly exercises the control structure of a piece of software than does either statement or branch testing. Despite this, the exceptionally small number of papers which detail experience of using LCSAJ testing clearly indicates that its popularity falls considerably short of that of the other two methods. One factor that has contributed to this situation is the apparent absence of any attempt to assess the effort entailed by LCSAJ testing in practice, thereby precluding any meaningful cost-effectiveness analysis of the method. Such an attempt is reported in this paper.A significant influence on the effort associated with LCSAJ testing is the number of test paths that must be generated to achieve a specified level of cover, and this is determined by the number of such paths that are found to be infeasible. Effort, therefore, is dependent upon the effectiveness of the path generation method/strategy in avoiding infeasible paths. The attempt to assess the effort entailed by LCSAJ testing which is reported here makes use of a new path selection strategy. This strategy seeks to reduce,a priori, the incidence of infeasible paths in the test set that is generated. Details of the strategy are presented, as are the results which were obtained by applying it to a set of subroutines. From the results, a measure of the effort entailed in employing the strategy is deduced. Subsequently, it is argued that features of the strategy enable pertinent comments to be made not only about the effort associated with employing the strategy, but also about the effort entailed by LCSAJ testing in general. 相似文献
16.
Mutation testing is a technique for testing software units that has great potential for improving the quality of testing, and thereby increasing the ability to assure the high reliability of critical software. It will be shown that recent advances in mutation research have brought a practical mutation testing system closer to reality. One recent advance is a partial solution to the problem of automatically detecting equivalent mutant programs. Equivalent mutants are currently detected by hand, which makes it very expensive and time-consuming. The problem of detecting equivalent mutants is a specific instance of a more general problem, commonly called the feasible path problem, which says that for certain structural testing criteria some of the test requirements are infeasible in the sense that the semantics of the program imply that no test case satisfies the test requirements. Equivalent mutants, unreachable statements in path testing techniques, and infeasible DU-pairs in data flow testing are all instances of the feasible path problem. This paper presents a technique that uses mathematical constraints, originally developed for test data generation, to detect some equivalent mutants and infeasible paths automatically. © 1997 John Wiley & Sons, Ltd. 相似文献
17.
《Information and Software Technology》2007,49(9-10):1045-1060
Branch testing is a well established method for exercising software. JJ-path testing, whilst employed by some practitioners, is less popular, and the testing of JJ-pairs finds few adherents. In this paper an objective, practical study of the cost-effectiveness of these three testing methods is reported. The effectiveness of each method is assessed, in the presence of infeasible paths, not only on its ability to cover the specific structural element of code that it targets, but also on its ability to cover the structural elements targeted by the other two methods – the collateral coverage it achieves. The assessment is based on the results derived from experiments in which each of the three methods is applied to 35 units of program code. 相似文献
18.
《IEEE transactions on pattern analysis and machine intelligence》1980,(3):278-286
There are a number of practical difficulties in performing a path testing strategy for computer programs. One problem is in deciding which paths, out of a possible infinity, to use as test cases. A hierarchy of structural test metrics is suggested to direct the choide and to monitor the coverge of test paths. Another problem is that many of the chosen paths may be infeasible in the sense that no test data can ever execute them. Experience with the use of "allegations" to circumvent this problem and prevent the static generation of many infeasible paths is reported. 相似文献
19.
《Information and Software Technology》2012,54(9):915-932
ContextGenerally, mutation analysis has been identified as a powerful testing method. Researchers have shown that its use as a testing criterion exercises quite thoroughly the system under test while it achieves to reveal more faults than standard structural testing criteria. Despite its potential, mutation fails to be adopted in a widespread practical use and its popularity falls significantly short when compared with other structural methods. This can be attributed to the lack of thorough studies dealing with the practical problems introduced by mutation and the assessment of the effort needed when applying it. Such an incident, masks the real cost involved preventing the development of easy and effective to use strategies to circumvent this problem.ObjectiveIn this paper, a path selection strategy for selecting test cases able to effectively kill mutants when performing weak mutation testing is presented and analysed.MethodThe testing effort is highly correlated with the number of attempts the tester makes in order to generate adequate test cases. Therefore, a significant influence on the efficiency associated with a test case generation strategy greatly depends on the number of candidate paths selected in order to achieve a predefined coverage goal. The effort can thus be related to the number of infeasible paths encountered during the test case generation process.ResultsAn experiment, investigating well over 55 million of program paths is conducted based on a strategy that alleviates the effects of infeasible paths. Strategy details, along with a prototype implementation are reported and analysed through the experimental results obtained by its employment to a set of program units.ConclusionThe results obtained suggest that the strategy used can play an important role in making the mutation testing method more appealing and practical. 相似文献