Font Size: a A A

Test Cases Generation Based On Particle Swarm Optimization

Posted on:2024-07-27Degree:MasterType:Thesis
Country:ChinaCandidate:B T LiaoFull Text:PDF
GTID:2568307118476874Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
With the expansion of the scale and complexity of modern software,the difficulty and complexity of software testing are also increasing.Software testing is essential for the software development life cycle to ensure successful software performance.However,manual test case design can be a laborious and time-consuming process.Automated test case generation technology can improve productivity and reduce human,financial,and temporal costs in software development.Therefore,the study of this technology has significant value.Search-based test case generation technology converts the test case generation process into an optimization problem and employs heuristic search algorithms to solve it.Since the Particle Swarm Optimization algorithm is a simple,efficient,and robust algorithm,it has successfully been applied in test case generation.However,this algorithm may face challenges of falling into local optimal solutions,leading to incomplete coverage of generated test cases and high calculation costs induced by highdimensional search spaces.This thesis aims to study test case generation technology based on Particle Swarm Optimization.The main contents of this thesis are listed as follows:(1)To address the challenge of local optimal,this thesis presents an adaptive random testing-based Particle Swarm Optimization algorithm.When the population falls into a local optimal solution,this algorithm can escape from optimal according to the similarity between candidate test cases and generated test cases by introducing the idea of adaptive random testing into test case generation based on Particle Swarm Optimization.This improves the possibility of finding a global optimal solution for higher search accuracy and global exploration ability.(2)Another challenge faced by this algorithm is the increasing computational cost with a growing program search space.Thus,this thesis proposes a surrogate modelbased Particle Swarm Optimization algorithm.This algorithm introduces a proxy model trained using a sample set to estimate the particle’s evolution fitness.It selects high fitness estimate particles to execute programs and calculate real fitness.The proxy model is updated based on the error between the estimate and the actual value.This approach enhances test case generation efficiency and reduces computation time and costs.(3)Finally,based on the above research,this thesis designs and implements a prototype system of test case generation based on a search algorithm.The system supports input parameter settings and has strong scalability,facilitating easy integration of other search algorithms,and improving test case generation algorithm efficiency.
Keywords/Search Tags:Software testing, Test case generation, Particle swarm optimization, Adaptive random testing, Surrogate model
PDF Full Text Request
Related items