Font Size: a A A

Automatic Generation And Reduction Of Random Test Case

Posted on:2011-11-12Degree:MasterType:Thesis
Country:ChinaCandidate:Q CaoFull Text:PDF
GTID:2178360308455359Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
As computer's soul, the software plays an important role in the national economy and social life. The quality of software directly affects the normal operation of the various industries. The user often suffers software errors, what's worse, the software errors could cause huge economic losses or casualties. Software testing is an important means to ensure software quality and reliability. It is an indispensable part in the software development. The users have been requiring more high quality software product and software engineering has been becoming more sophisticated. So the proportion of the software testing in the software development cycle is increasing. Designing test case is the core of software testing. The quantity and quality of test cases determine whether software testing is good or bad. Designing test case often needs much manual work, which is time-consuming and ineffective. Therefore, implementing an automatic test case generation tool, which could improve the efficiency and quality of software testing, is valuable for academic research and industry application.In order to solve the key problem of test case generation, this thesis designs a fully automatic test case generation framework tool by integrating random testing and invariant extraction technique. After analyzing the advantages and disadvantages of random testing, we quite value its merit of the high degree of automation and utilize preset-value to improve the coverage of random testing. And the users are allowed to customize the preset-value. Our technique could generate data for complexed type, so that it has wide scope of application. The introduction of failed test case filtering mechanism could ensure the proper operation of test cases. Invariants describe the program properties that hold at a program point or points at runtime. By means of this feature, we design a reduction algorithm based on the invariant's change. And the reduction algorithm can effectively shrink the size of the randomly generated test cases. At the same time, the algorithm provides a new termination standard for the test case generation, and solves the former time-constraint shortcoming. The outputs include three sections, the normal test cases used for debugging manually or regression testing, the failed test cases to reveal errors and the invariants to reveal program properties.The experimental results indicate that, the test case random generation technique described in the thesis could generate test cases automatically without any manual intervention. The test case reduction algorithm performs well. The failed test cases could find errors in program. The test cases with preset-value achieve better code coverage than traditional random testing, and close mutation score compared with other random testing tools.
Keywords/Search Tags:random testing, test case, program invariant, automatic testing
PDF Full Text Request
Related items