Font Size: a A A

Many-objective Optimization Based Test Case Generation For SQL Queries

Posted on:2022-07-06Degree:MasterType:Thesis
Country:ChinaCandidate:S Z DongFull Text:PDF
GTID:2518306509984949Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Generating test cases for SQL queries is an important but challenging task in software engineering.Due to the importance of database-centric applications in production and life,test case generation for SQL query has gained great attention in this field.The main goal is to construct a set of test databases,in pursuit of certain coverage criteria.However,due to the intrinsic complexity of SQL queries,test case generation for SQL queries can be difficult and time-consuming.Most of the existing studies model this problem as a single-objective optimization problem,and use the single-objective method to solve this problem.However,due to the improper handling of the relationship between different coverage targets,we could observe significant limitations in the existing studies.These limitations are mainly manifested as Inter-objective relationship barrier and test database bloating barrier.To overcome these limitations,this paper developed a test case generation framework Moe SQL,which can generate test cases with high coverage and low database scale,by combining two unique mechanisms.To tackle the inter-objective relationship barrier,this paper adopted a many-objective evolutionary algorithm.By building a many-objective model for the problem,this algorithm can cover multiple targets in a single evolutionary process to avoid redundant computation.In order to tackle test database bloating,this paper further uses the solutions obtained from evolutionary algorithm.The test database reduction process is decomposed into a series of subproblems,and a local search operator is used to solve them.Due to the reduction of the search space,it is easier to obtain more compact test database.Experiments over 1888 SQL queries demonstrate that,Moe SQL is able to achieve 99.80%target coverage within 30 minutes,which is comparable to the state-of-art single-objective algorithm Evo SQL.At the same time,the test database scale is only 59.47% of Evo SQL.Further statistics reveal that Moe SQL is able to achieve moderate trade-off between the runtime and the test database scale metrics.
Keywords/Search Tags:Test Case Generation, Search Based Software Engineering, Many-objective Optimization
PDF Full Text Request
Related items