Font Size: a A A

Research And Implementation Of Automatic Generation Of SQL Test Cases

Posted on:2013-02-11Degree:MasterType:Thesis
Country:ChinaCandidate:Q ZhangFull Text:PDF
GTID:2218330371456050Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Writing SQL statements is an important part of testing the database management system. Automatically generate SQL statements can effectively reduce the workload of testers, but there is no direct automated tools to generate SQL statements.It was first used in compiler testing that generating sentences in line with the context-free grammar. The current methods of sentences generating are mainly random, rule law, two-dimensional approximation. The random algorithm, adds a weight which identifies the probability of production is covered for each production, to become a weighted on a random algorithm. Random coverage method of weighted well combines the advantages of random coverage, according to certain rules to set the right values. The importance of making the production of different concentration in the resulting sentence has been fully realized.SQL statements are sentences of SQL grammar. The idea of basing on context-free grammar to generate sentences can be used to generate the SQL statement. Taking an SQL statement as a test case, can effectively test the syntax errors of the database management system.According to the idea of weighted random algorithm, by simulating the production of direct derivation, giving a method of generating the SQL statements conform to the SQL grammar, as test case methods; studied automated collection process that documents from the BNF grammar to generate the SQL test case. This process includes several stages:change each of the SQL grammar non-terminal into a corresponding analytic function, all of which constitute a set of analytic functions of the rule base; through generative grammar automatically generate SQL test cases; the usage of an array of right values combination of random numbers, increase the flexibility to generate test cases; use the maximum number calls of non-terminals to terminate SQL test case generation.
Keywords/Search Tags:automatically generate, test cases, SQL, weight array, the maximum number of cycles
PDF Full Text Request
Related items