Runtime class recompilation during mutation testing
AssigneeState Farm Mutual Automobile Insurance Company
InventorsAndrew L Pearson, Nate Shepherd
Life of this patent
Estimating the term…
Abstract
The present disclosure provides a mutation test manager configured to initialize multiple computing threads configuring a computing host to perform parallel computation; mutate class files within context of each computing thread; recompile mutated class files independently in each respective computing thread to generate heterogeneous mutants; and execute pending unit tests against heterogeneous mutants independently in each respective computing thread. Consequently, the mutation testing process is decoupled from computational bottlenecks which would result from linear, sequential generation, compilation, and testing of each mutation, especially in the context of JVM® programming languages configured to generate class-rich object code.
Claims24
A method, comprising:
- mutating, by a processor running a first computing thread among a plurality of computing threads each executing target object code in a target runtime environment, part of a class file of target source code, wherein part of the class file or a different class file of the target source code is being mutated substantially concurrently, by the processor or by a different processor, in at least one other computing thread of the plurality of computing threads, and the part of the class file of the target source code is being mutated, by the processor or by a different processor, in the at least one other computing thread in a manner heterogeneous to the mutation of the part of the class file of the target source code in the first computing thread;
- causing, by the processor, a compiler executing in the first computing thread to compile the class file of the target source code containing the mutation without compiling other class files of the target source code, resulting in generating a mutant class object code;
- and
- replacing, by the processor, a non-mutant object class code of the executing target object code with the mutant class object code.
A computing host comprising:
- one or more processors;
- and
- memory communicatively coupled to the one or more processors, the memory storing computer-executable modules executable by the one or more processors that, when executed by the one or more processors, perform associated operations, the computer-executable modules comprising:
- a compiler module;
- and
- a mutation test managing module further comprising computer-executable submodules executable by the one or more processors that, when executed by the one or more processors, perform associated operations, the computer-executable submodules comprising:
- a class file mutating submodule configured to mutate, in a first computing thread among a plurality of computing threads each executing target object code in a target runtime environment, part of a class file of target source code;
- to mutate part of the class file or a different class file of the target source code substantially concurrently among the plurality of computing threads;
- and to mutate the part of the class file of the target source code among the plurality of computing threads in a heterogeneous manner in each respective computing thread;
- a compiler configuring submodule configured to configure the compiler module executing in the first computing thread to compile the class file of the target source code containing the mutation without compiling other class files of the target source code, resulting in generating a mutant class object code;
- and
- a class loading submodule configured to replace a non-mutant object class code of the executing target object code with the mutant class object code.
A computer-readable storage medium storing computer-readable instructions executable by one or more processors, that when executed by the one or more processors, cause the one or more processors to perform operations comprising:
- mutating, in a first computing thread among a plurality of computing threads each executing target object code in a target runtime environment, wherein part of a class file of target source code, part of the class file or a different class file of the target source code being mutated substantially concurrently in at least one other computing thread of the plurality of computing threads, and the part of the class file of the target source code being mutated in the at least one other computing thread in a manner heterogeneous to the mutation of the part of the class file of the target source code in the first computing thread;
- configuring a compiler executing in the first computing thread to compile the class file of the target source code containing the mutation without compiling other class files of the target source code, resulting in generating a mutant class object code;
- and
- replacing a non-mutant object class code of the executing target object code with the mutant class object code.
Dependencies are inferred from the claim text.