首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 125 毫秒
1.
不可达路径增加了程序的复杂度和冗余度,不可达路径的检测是结构测试中的一个关键问题。提出了一种包含异常处理结构的程序不可达路径的静态检测方法。该方法根据数据流信息判断产生冲突的分支,进而利用分支冲突检测路径的可达性;在数据流分析时考虑异常处理结构和变量别名对数据流信息的影响。实例分析结果表明,该方法可以进一步提高路径可达性检测的准确度。  相似文献   

2.
给出一种生成分支覆盖测试路径集的改进算法,降低了不可行路径出现的概率,并在此基础上设计实现了一个面向分支覆盖的测试路径自动生成系统AGTP.通过实例验证了算法及系统的有效性,测试结果表明该系统能精确有效地生成分支测试路径集.  相似文献   

3.
考虑程序中分支冲突和异常处理结构对控制流信息的影响,提出一种改进的程序可达基路径生成方法。分析不可达路径产生的原因及其判定方法,构建异常控制流图。在此基础上计算相关分支之间的关系,利用深度优先遍历方法得到程序的可达基路径集。实例分析结果表明,该方法能准确生成可达基路径集,满足基路径测试的要求。  相似文献   

4.
在对两种较为有效的分支测试路径集生成算法分析研究的基础上,提出了一种改进的测试路径集生成方法,并设计实现了一个面向分支覆盖的测试路径自动生成系统,通过实例验证后表明,该系统能有效生成分支测试路径集,并具有较高的测试覆盖率。  相似文献   

5.
设计了一个通用的基于控制流和数据流的结构测试数据自动生成的工具。该工具根据控制流和数据流测试中所采用的覆盖标准来选取测试路径,并以改进后的迭代松弛法为核心,对所选取的路径生成测试数据。同时工具采用Fibonacci法优化选取路径,对不可达路径进行处理,并对测试数据的分支覆盖率、DCP覆盖率等进行了统计。实验结果表明该工具是可行的。  相似文献   

6.
通过构造新的程序流图,利用Fibonacci法优化选取路径.为指定的分支生成测试数据。提出了路径测试数据生成代价的概念,并给出了代价的计算方法。当所选路径的分支谓词均为线性表达式时,直接求解线性约束集即可生成测试数据,或判定路径不可行;当分支谓词含有非线性表达式时,利用均差近似导数将非线性函数线性化,通过简单的迭代,亦能容易生成测试数据或判定路径在很大程度上不可行。若所选路径不可行或在很大程度上不可行,则选取新的路径,重复以上过程,直至求出所期望的数据,或无新的路径被选取,给定分支不可达。实例和实验表明,算法可行、有效。  相似文献   

7.
一种路径敏感的静态缺陷检测方法   总被引:10,自引:0,他引:10  
提出一种多项式复杂度的路径敏感静态缺陷检测算法.该方法采用变量的抽象取值范围来表示属性状态条件,通过属性状态条件中的变量抽象取值范围为空来判断不可达路径.在控制流图(control flow graph,简称CFG)中的汇合节点上合并相同属性状态的状态条件,从而避免完整路径上下文分析的组合爆炸问题.该算法已应用于缺陷检测系统DTS(defect testing system).实际测试结果表明,该方法能够减少误报.  相似文献   

8.
针对检测缺陷的测试数据生成效率低下问题,提出变异测试和路径覆盖测试技术结合的测试数据生成方法。首先,采用变异测试技术生成的变异分支融入程序,生成新的被测程序;然后,在原路径集中挑选目标路径,通过分析变异分支与路径关联关系,将变异分支融入路径。最后,基于遗传算法生成覆盖路径的测试数据。实验结果表明,多种群遗传算法生成测试数据的时间,比单种群遗传算法节约了41.15%。由此可见,对于覆盖多路径测试数据生成,多种群遗传算法的效率比单种群遗传算法高。  相似文献   

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

10.
黄晨  董燕  于倩  虞砺琨 《测控技术》2017,36(1):100-103
基于目标码的测试覆盖率分析是软件测试过程的必要关键步骤,不可达分析能够保证测试的完整性和充分性.给出嵌入式软件基于覆盖率测试的分析过程,在嵌入式虚拟测试平台的基础上,对程序目标代码插桩,采用语句和分支覆盖率分析准则,将黑盒测试和白盒测试相结合,分析不可达分支语句引入机理,并通过具体的反汇编代码实例分析来验证这种测试方法的可行性和有效性.专门针对覆盖率不可达的分析可以有效验证软件功能,发现软件缺陷,进一步提升软件质量.  相似文献   

11.
丁蕊  董红斌  张岩  冯宪彬 《软件学报》2016,27(4):814-827
测试数据的自动生成,是提高软件测试效率的重要手段.从软件测试工程实践的角度提出快速生成测试数据的完整模型,更有利于提高测试数据生成效率.为此:(1)提出关键点路径表示法,以得出待测程序的理论路径数,并快速确定已覆盖路径的邻近路径;(2)用随机生成的数据运行简化后的插装程序,得到部分测试数据;(3)将理论路径分成易覆盖路径、难覆盖路径和不可行路径;(4)根据已覆盖路径及其测试数据提供的信息,使用遗传算法生成难覆盖路径的测试数据.仿真实验结果表明了所提方法的有效性.  相似文献   

12.
一种用于类测试的改进型EFSM模型   总被引:3,自引:1,他引:2  
陈祎  桑楠  雷航 《计算机应用》2005,25(8):1890-1892
扩展有限状态机(EFSM)中迁移存在前置条件和相应操作,而前置条件和相应操作中变量的相互依赖性导致了EFSM中存在不可达路径,不利于基于EFSM模型的类的测试。通过把UML状态图转换成EFSM模型,提出一种消除EFSM模型不可达路径算法,从而建立一种用于面向对象软件的类测试模型,通过该模型可以应用传统的数据流和控制流分析技术对类进行测试。  相似文献   

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

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

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