Software testing courses are characterized by strong practicality,comprehensiveness,and diversity.Due to the differences among students and the needs to design personalized solutions for their specific requirements,th...Software testing courses are characterized by strong practicality,comprehensiveness,and diversity.Due to the differences among students and the needs to design personalized solutions for their specific requirements,the design of the existing software testing courses fails to meet the demands for personalized learning.Knowledge graphs,with their rich semantics and good visualization effects,have a wide range of applications in the field of education.In response to the current problem of software testing courses which fails to meet the needs for personalized learning,this paper offers a learning path recommendation based on knowledge graphs to provide personalized learning paths for students.展开更多
Let be an undirected graph. The maximum cycle packing problem in G then is to find a collection of edge-disjoint cycles C<sub>i</sup>in G such that s is maximum. In general, the maximum cycle packing probl...Let be an undirected graph. The maximum cycle packing problem in G then is to find a collection of edge-disjoint cycles C<sub>i</sup>in G such that s is maximum. In general, the maximum cycle packing problem is NP-hard. In this paper, it is shown for even graphs that if such a collection satisfies the condition that it minimizes the quantityon the set of all edge-disjoint cycle collections, then it is a maximum cycle packing. The paper shows that the determination of such a packing can be solved by a dynamic programming approach. For its solution, an-shortest path procedure on an appropriate acyclic networkis presented. It uses a particular monotonous node potential.展开更多
The aim of software testing is to find faults in a program under test, so generating test data that can expose the faults of a program is very important. To date, current stud- ies on generating test data for path cov...The aim of software testing is to find faults in a program under test, so generating test data that can expose the faults of a program is very important. To date, current stud- ies on generating test data for path coverage do not perform well in detecting low probability faults on the covered path. The automatic generation of test data for both path coverage and fault detection using genetic algorithms is the focus of this study. To this end, the problem is first formulated as a bi-objective optimization problem with one constraint whose objectives are the number of faults detected in the traversed path and the risk level of these faults, and whose constraint is that the traversed path must be the target path. An evolution- ary algorithm is employed to solve the formulated model, and several types of fault detection methods are given. Finally, the proposed method is applied to several real-world programs, and compared with a random method and evolutionary opti- mization method in the following three aspects: the number of generations and the time consumption needed to generate desired test data, and the success rate of detecting faults. The experimental results confirm that the proposed method can effectively generate test data that not only traverse the target path but also detect faults lying in it.展开更多
Generating test data that can expose the faults of the program is an important issue in software testing. Al- though previous methods of covering path can generate test data to traverse target path, the test data gene...Generating test data that can expose the faults of the program is an important issue in software testing. Al- though previous methods of covering path can generate test data to traverse target path, the test data generated by these methods are difficult in detecting some low-probabilistic faults that lie on the covered paths. We present a method of generating test data for covering multiple paths to detect faults in this study. First, we transform the problem of cover- ing multiple paths and detecting faults into a multi-objective optimization problem with constraint, and construct a mathe- matical model for it. Then, we give a strategy of solving the model based on a weighted genetic algorithm. Finally, we ap- ply our method to several real-world programs, and compare it with several methods. The experimental results confirm that the proposed method can more efficiently generate test data that not only traverse the target paths but also detect faults lying in them than other methods.展开更多
测试数据自动生成方法是软件测试领域研究的热点。基于遗传算法的启发式搜索算法是一种路径覆盖生成测试数据的方法。文中提出了一种基于自适应随机测试(Adaptive Random Testing,ART)算法更新种群的方法,将ART融入遗传算法,优化选择操...测试数据自动生成方法是软件测试领域研究的热点。基于遗传算法的启发式搜索算法是一种路径覆盖生成测试数据的方法。文中提出了一种基于自适应随机测试(Adaptive Random Testing,ART)算法更新种群的方法,将ART融入遗传算法,优化选择操作,动态更新种群,从而增加种群进化过程中的个体多样性,提高了收敛速度,有效地减少了陷入局部最优。实验结果显示,与传统遗传算法生成测试数据的方法相比,改进的算法明显提高了路径覆盖率,减少了种群平均进化代数。展开更多
Automatically generating test cases by evolutionary algorithms to satisfy the path coverage criterion has attracted much research attention in software testing.In the context of generating test cases to cover many tar...Automatically generating test cases by evolutionary algorithms to satisfy the path coverage criterion has attracted much research attention in software testing.In the context of generating test cases to cover many target paths,the efficiency of existing methods needs to be further improved when infeasible or difficult paths exist in the program under test.This is because a significant amount of the search budget(i.e.,time allocated for the search to run)is consumed when computing fitness evaluations of individuals on infeasible or difficult paths.In this work,we present a feedback-directed mechanism that temporarily removes groups of paths from the target paths when no improvement is observed for these paths in subsequent generations.To fulfill this task,our strategy first organizes paths into groups.Then,in each generation,the objective scores of each individual for all paths in each group are summed up.For each group,the lowest value of the summed up objective scores among all individuals is assigned as the best aggregated score for a group.A group is removed when no improvement is observed in its best aggregated score over the last two generations.The experimental results show that the proposed approach can significantly improve path coverage rates for programs under test with infeasible or difficult paths in case of a limited search budget.In particular,the feedback-directed mechanism reduces wasting the search budget on infeasible paths or on difficult target paths that require many fitness evaluations before getting an improvement.展开更多
基金supported by the Special Funds for Basic Research of Central Universities(D5000220240)the Special Funds for Education and Teaching Reform in 2023(06410-23GZ230102)。
文摘Software testing courses are characterized by strong practicality,comprehensiveness,and diversity.Due to the differences among students and the needs to design personalized solutions for their specific requirements,the design of the existing software testing courses fails to meet the demands for personalized learning.Knowledge graphs,with their rich semantics and good visualization effects,have a wide range of applications in the field of education.In response to the current problem of software testing courses which fails to meet the needs for personalized learning,this paper offers a learning path recommendation based on knowledge graphs to provide personalized learning paths for students.
文摘Let be an undirected graph. The maximum cycle packing problem in G then is to find a collection of edge-disjoint cycles C<sub>i</sup>in G such that s is maximum. In general, the maximum cycle packing problem is NP-hard. In this paper, it is shown for even graphs that if such a collection satisfies the condition that it minimizes the quantityon the set of all edge-disjoint cycle collections, then it is a maximum cycle packing. The paper shows that the determination of such a packing can be solved by a dynamic programming approach. For its solution, an-shortest path procedure on an appropriate acyclic networkis presented. It uses a particular monotonous node potential.
基金Acknowledgements This study was jointly funded by Fundamental Research Funds for Central Universities (2013XK09), the National Natural Science Foundation of China (Grant No. 61075061), the Excellent Young Scholars of Higher University of Heilongjiang Province (1252G063), the Natural Science Foundation of Jiangsu Province (BK2012566), the Specialized Research Fund for the Doctoral Program of Higher Education (20100095110006), the Excellent Creative Team Foundation of China University of Mining and Technology (2011ZCX002), and the Key Advanced Research Program of Mudanjiang Normal University (SY201216).
文摘The aim of software testing is to find faults in a program under test, so generating test data that can expose the faults of a program is very important. To date, current stud- ies on generating test data for path coverage do not perform well in detecting low probability faults on the covered path. The automatic generation of test data for both path coverage and fault detection using genetic algorithms is the focus of this study. To this end, the problem is first formulated as a bi-objective optimization problem with one constraint whose objectives are the number of faults detected in the traversed path and the risk level of these faults, and whose constraint is that the traversed path must be the target path. An evolution- ary algorithm is employed to solve the formulated model, and several types of fault detection methods are given. Finally, the proposed method is applied to several real-world programs, and compared with a random method and evolutionary opti- mization method in the following three aspects: the number of generations and the time consumption needed to generate desired test data, and the success rate of detecting faults. The experimental results confirm that the proposed method can effectively generate test data that not only traverse the target path but also detect faults lying in it.
基金This study was jointly funded by the Excellent Young Scholars of Higher University of Heilongjiang Province (1252G063), the National Natural Science Foundation of China (Grant No. 61375067), the National Basic Research Program of China (2014CB046306-2) the Nat- ural Science Foundation of Jiangsu Province (BK2012566), the Scientific and Technological Plan Project of Mudanjiang City (Z2013s043), and the Research Project of Mudanjiang Normal University (SY201216 and QY201214).
文摘Generating test data that can expose the faults of the program is an important issue in software testing. Al- though previous methods of covering path can generate test data to traverse target path, the test data generated by these methods are difficult in detecting some low-probabilistic faults that lie on the covered paths. We present a method of generating test data for covering multiple paths to detect faults in this study. First, we transform the problem of cover- ing multiple paths and detecting faults into a multi-objective optimization problem with constraint, and construct a mathe- matical model for it. Then, we give a strategy of solving the model based on a weighted genetic algorithm. Finally, we ap- ply our method to several real-world programs, and compare it with several methods. The experimental results confirm that the proposed method can more efficiently generate test data that not only traverse the target paths but also detect faults lying in them than other methods.
文摘测试数据自动生成方法是软件测试领域研究的热点。基于遗传算法的启发式搜索算法是一种路径覆盖生成测试数据的方法。文中提出了一种基于自适应随机测试(Adaptive Random Testing,ART)算法更新种群的方法,将ART融入遗传算法,优化选择操作,动态更新种群,从而增加种群进化过程中的个体多样性,提高了收敛速度,有效地减少了陷入局部最优。实验结果显示,与传统遗传算法生成测试数据的方法相比,改进的算法明显提高了路径覆盖率,减少了种群平均进化代数。
基金supported by the National Natural Science Foundation of China(No.61876207)the Natural Science Foundation of Guangdong Province(No.2022A1515011491)the Fundamental Research Funds for the Central Universities(No.2020ZYGXZR014).
文摘Automatically generating test cases by evolutionary algorithms to satisfy the path coverage criterion has attracted much research attention in software testing.In the context of generating test cases to cover many target paths,the efficiency of existing methods needs to be further improved when infeasible or difficult paths exist in the program under test.This is because a significant amount of the search budget(i.e.,time allocated for the search to run)is consumed when computing fitness evaluations of individuals on infeasible or difficult paths.In this work,we present a feedback-directed mechanism that temporarily removes groups of paths from the target paths when no improvement is observed for these paths in subsequent generations.To fulfill this task,our strategy first organizes paths into groups.Then,in each generation,the objective scores of each individual for all paths in each group are summed up.For each group,the lowest value of the summed up objective scores among all individuals is assigned as the best aggregated score for a group.A group is removed when no improvement is observed in its best aggregated score over the last two generations.The experimental results show that the proposed approach can significantly improve path coverage rates for programs under test with infeasible or difficult paths in case of a limited search budget.In particular,the feedback-directed mechanism reduces wasting the search budget on infeasible paths or on difficult target paths that require many fitness evaluations before getting an improvement.