Font Size: a A A

A Class Level Mutant Of Object-oriented Program And Its Testing Adequacy

Posted on:2006-07-19Degree:MasterType:Thesis
Country:ChinaCandidate:S HuFull Text:PDF
GTID:2168360155970795Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
This paper proposes a formal class level mutant generating algorithm conposed of attribute mutation and method mutation, and it realizes applying the mutation analysis and testing methodology into the object-oriented class-level testing.This paper begins with the object-oriented class-level testing and introduces the mutation testing theory, methodology and adequacy measurment and the research development and difficulty of combining mutation techonology with object-oriented testing. Then it discusses the new class-level mutant generating concept and idea proposed by Professor Chen huoyan and studies how to implement the algorithm and the testing adequacy of this mutation testing techonoloqy.The object of the mutation algorithm is the simple program mistakes easily made by programmer in the class code of 00 program. Firstly it partitions the private attributes and methods of the class tested, then scan the class code according every type of attributes and methods and at every arrtibute(method) reference replaces the reference with the othe attributes(methods) in the same type, then it turns out a set of mutants conforming to the grammar rules. After that it uses the given test program to run the set of mutants and the original program separately and records the results, writes down the dead mutants and calculates the testing adequacy.A class level mutation testing tool is constructed by embedding the mutant generating algorithm and testing adequacy analysis into the compiler of the program under testing. A prototype of the testing tool is designed and implemented in this paper. This tool realizes aotomaticly generating the mutants and calculating the testing adequacy S, of which the testcase constructing and analysis are made by people. The method has formal basis and conforms to the small and right grammar tranaformation mutation request .It changes the attributes and methods in a class so it is exactly class-level testing. This method partitions all attributes and methods by their types and scans the code line by line so it makes sure that every attribute(method) transforming is reasonable, right and the quantity of mutants is enough, and it also makes sure that this algorithm is feasible and effective .The idea of attribute mutation and method mutation is firstly proposed in class level mutants generating.
Keywords/Search Tags:object-oriented, testing at class level, mutant, testing adequacy
PDF Full Text Request
Related items