Font Size: a A A

Research On Automatic Generation Of Test Cases Based On Code Block Coverage

Posted on:2018-05-02Degree:MasterType:Thesis
Country:ChinaCandidate:J WenFull Text:PDF
GTID:2518306248482964Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
In recent years,with the continuous emergence of automation technology,more and more companies to pay attention to "test data,use case design automation" and "test results analysis,positioning,quality automation" and so on.At present,for large and complex software,manual detection is easy to leak detection,the need for a fully automated test system,through the cal-culation,quickly cover all the logic of the program,get input and output,thus helping to gener-ate a large number of test cases,and found some software defects The However,the premise of automated testing is the automated generation of test cases.Therefore,as far as possible code coverage,simple and practical,cost-effective test case automation generation method research will become one of the urgent problems to be solved.In this paper,by reading a large number of domestic and foreign references,aiming at the current situation of automated test case generation technology and the comparative analysis of the existing test case automatic generation algorithm,this paper proposes a test case automatic generation method based on code block coverage,And the realization of a set of fully automat-ed test case generation tool to complete the test case of automatic generation.In this paper,the main work is to use the plugging technology to block the program,and then use the genetic al-gorithm to generate test cases,and finally for the unwritten code block to cover again,to achieve a code block based on the test case automatically generated method,Improve the effi-ciency of test cases generated and the coverage of the code to help manual testing to save a lot of time.The main research contents are as follows:1.Code insertion technology research.Considering that most of the current code plug-in tools are mostly commercial,and many technologies are not open to the public,and most of the use of the line is inserted,in the effective code to insert the same probe,and the probe Type is the traditional function,under efficiency.Taking into account the technical requirements of this article,the design and implementation of code plugging technology to complete the source code for the automated code plug.2.Improved genetic algorithm research.Through the analysis of the current genetic algo-rithm to generate test case technology,the paper studies the principle of current genetic algo-rithm and the defects and shortcomings in generating test cases,and puts forward the improve-ment ideas and concrete methods.Through the improved genetic algorithm,the quality and ef-ficiency of generating test cases are improved.From the experimental results,the improved ge-netic algorithm is much more efficient than the standard genetic algorithm in generating test cases.3.Not covered code block test case re-generation method research.Research how some of the code blocks that have not yet been covered can improve the efficiency and quality of gener-ating these unwritten code block test cases.In this paper,by presenting a static structure analy-sis technique using a program,a test case once covers the neighborhood of the target code block(the upper node of the target code block),then it has a large probability of covering the target block.Therefore,this paper through a certain calculation,to meet the requirements of the test case,once again through the genetic algorithm to achieve the full coverage of program logic.The method proposed in this paper not only realizes the automatic test case generation system,but also improves the efficiency and quality of the test case by a certain improvement algorithm,and through the calculation method,it can locate exactly which code block is not running,more targeted to generate test cases.Assisted manual testing saves a lot of time and cost.Experiments show that the system can not only generate a large number of test cases,and to a certain extent,can improve the efficiency of generating test cases.The method has been patented and patented as part of a product that is about to be put into use.
Keywords/Search Tags:automation, test cases, insert pile technology, genetic algorithm, static structure
PDF Full Text Request
Related items