{"title":"Towards automatic generation of test data using branch coverage","authors":"Jifeng Chen, Luming Yang","doi":"10.1109/ICCSE.2009.5228264","DOIUrl":null,"url":null,"abstract":"By analyzing various methods of automatic generation of test data using branch coverage, their characteristics and disadvantages are discussed, a new algorithm for automatic generation of test data is proposed. Through constructing the new procedure flow chart, the algorithm optimizes the selection paths using Fibonacci law, and generates test data for assigned branch. When the branch predicates of the chosen path are linear representation, solve the linear restraint set directly to generate test data, otherwise determine that the path is inaccessible; When the branch predicate composing of nonlinear expression, linearize nonlinear function by using the divided difference approximate derivative to ensure the test data can easily generated through simple iteration, or conclude that path is inaccessible to a large extent. If the chosen path is to a large extent inaccessible or inaccessible, then a new path is selected, repeat the above process until the desired data obtained, if no new path was chosen, then the specified branch was inaccessible. Experiments show that the algorithm is feasible and valid.","PeriodicalId":303484,"journal":{"name":"2009 4th International Conference on Computer Science & Education","volume":"5 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2009 4th International Conference on Computer Science & Education","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICCSE.2009.5228264","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
By analyzing various methods of automatic generation of test data using branch coverage, their characteristics and disadvantages are discussed, a new algorithm for automatic generation of test data is proposed. Through constructing the new procedure flow chart, the algorithm optimizes the selection paths using Fibonacci law, and generates test data for assigned branch. When the branch predicates of the chosen path are linear representation, solve the linear restraint set directly to generate test data, otherwise determine that the path is inaccessible; When the branch predicate composing of nonlinear expression, linearize nonlinear function by using the divided difference approximate derivative to ensure the test data can easily generated through simple iteration, or conclude that path is inaccessible to a large extent. If the chosen path is to a large extent inaccessible or inaccessible, then a new path is selected, repeat the above process until the desired data obtained, if no new path was chosen, then the specified branch was inaccessible. Experiments show that the algorithm is feasible and valid.