System for metamorphic relationship based code testing using mutant generators
First Claim
1. A system for metamorphic relationship based code testing using mutant generators, wherein the system is configured for identifying and remediating defects in an original program based on constructing at least one mutated program by distorting the original program, and analyzing expression of mutants in test results, the system comprising:
- at least one memory device with computer-readable program code stored thereon;
at least one communication device;
at least one processing device operatively coupled to the at least one memory device and the at least one communication device, wherein executing the computer-readable code is configured to cause the at least one processing device to;
receive, via an operative communication channel with a user device, a user request to perform defect analysis of an original program;
retrieve original program code associated with the original program;
determine one or more metamorphic relationships associated with one or more process functions of the original program based on analyzing the original program;
construct a first mutated program, wherein constructing the mutated program comprises;
constructing one or more mutants, wherein each mutant of the one or more mutants is constructed by distorting a portion of the original program code; and
constructing the first mutant program based on embedding the one or more mutants in the original program code;
map the one or more mutants to the one or more metamorphic relationships;
implement a first test by providing one or more predetermined test cases as input to the original program, wherein the original program provides an original test output in response to the first test;
implement a second test by providing the one or more predetermined test cases as input to the first mutated program, wherein the first mutated program provides a first mutated test output in response to the second test;
determine whether the original program comprises at least one defect based on at least comparing the original test output to the first mutated test output;
in response to determining that the original program comprises the at least one defect, determine a first mutant of the one or more mutants associated with the at least one defect;
identify a first metamorphic relationship of the one or more metamorphic relationships mapped to the first mutant;
transmit, via the operative communication channel with the user device, a notification to the user indicating the at least one defect and the first metamorphic relationship; and
in response to a defect correction input from the user, initiate correction of the original program code by at least modifying code associated with a first process function of the one or more process functions of the original program, thereby constructing a corrected original program code.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the invention are directed to metamorphic relationship based code testing using mutant generators. The system is configured for identifying and remediating defects in an original program based on constructing at least one mutated program by distorting the original program, and analyzing expression of mutants in test results. In particular, the system receives a request to perform defect analysis of an original program. In response, the system constructs a first mutated program by embedding one or more mutants in the original program code. Moreover, the system typically maps the one or more mutants to one or more metamorphic relationships of process functions of the original program. The system may then implement tests of the original program and the first mutated program by providing one or more predetermined test cases as input to both, to determine whether the original program comprises at least one defect.
-
Citations
20 Claims
-
1. A system for metamorphic relationship based code testing using mutant generators, wherein the system is configured for identifying and remediating defects in an original program based on constructing at least one mutated program by distorting the original program, and analyzing expression of mutants in test results, the system comprising:
-
at least one memory device with computer-readable program code stored thereon; at least one communication device; at least one processing device operatively coupled to the at least one memory device and the at least one communication device, wherein executing the computer-readable code is configured to cause the at least one processing device to; receive, via an operative communication channel with a user device, a user request to perform defect analysis of an original program; retrieve original program code associated with the original program; determine one or more metamorphic relationships associated with one or more process functions of the original program based on analyzing the original program; construct a first mutated program, wherein constructing the mutated program comprises; constructing one or more mutants, wherein each mutant of the one or more mutants is constructed by distorting a portion of the original program code; and constructing the first mutant program based on embedding the one or more mutants in the original program code; map the one or more mutants to the one or more metamorphic relationships; implement a first test by providing one or more predetermined test cases as input to the original program, wherein the original program provides an original test output in response to the first test; implement a second test by providing the one or more predetermined test cases as input to the first mutated program, wherein the first mutated program provides a first mutated test output in response to the second test; determine whether the original program comprises at least one defect based on at least comparing the original test output to the first mutated test output; in response to determining that the original program comprises the at least one defect, determine a first mutant of the one or more mutants associated with the at least one defect; identify a first metamorphic relationship of the one or more metamorphic relationships mapped to the first mutant; transmit, via the operative communication channel with the user device, a notification to the user indicating the at least one defect and the first metamorphic relationship; and in response to a defect correction input from the user, initiate correction of the original program code by at least modifying code associated with a first process function of the one or more process functions of the original program, thereby constructing a corrected original program code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A computer program product for metamorphic relationship based code testing using mutant generators, wherein the computer program product is configured for identifying and remediating defects in an original program based on constructing at least one mutated program by distorting the original program, and analyzing expression of mutants in test results, the computer program product comprising a non-transitory computer-readable storage medium having computer-executable instructions to:
-
receive, via an operative communication channel with a user device, a user request to perform defect analysis of an original program; retrieve original program code associated with the original program; determine one or more metamorphic relationships associated with one or more process functions of the original program based on analyzing the original program; construct a first mutated program, wherein constructing the mutated program comprises; constructing one or more mutants, wherein each mutant of the one or more mutants is constructed by distorting a portion of the original program code; and constructing the first mutant program based on embedding the one or more mutants in the original program code; map the one or more mutants to the one or more metamorphic relationships; implement a first test by providing one or more predetermined test cases as input to the original program, wherein the original program provides an original test output in response to the first test; implement a second test by providing the one or more predetermined test cases as input to the first mutated program, wherein the first mutated program provides a first mutated test output in response to the second test; determine whether the original program comprises at least one defect based on at least comparing the original test output to the first mutated test output; in response to determining that the original program comprises the at least one defect, determine a first mutant of the one or more mutants associated with the at least one defect; identify a first metamorphic relationship of the one or more metamorphic relationships mapped to the first mutant; transmit, via the operative communication channel with the user device, a notification to the user indicating the at least one defect and the first metamorphic relationship; and in response to a defect correction input from the user, initiate correction of the original program code by at least modifying code associated with a first process function of the one or more process functions of the original program, thereby constructing a corrected original program code. - View Dependent Claims (14, 15, 16)
-
-
17. A method for metamorphic relationship based code testing using mutant generators, wherein the method is configured for identifying and remediating defects in an original program based on constructing at least one mutated program by distorting the original program, and analyzing expression of mutants in test results, the method comprising:
-
receiving, via an operative communication channel with a user device, a user request to perform defect analysis of an original program; retrieving original program code associated with the original program; determining one or more metamorphic relationships associated with one or more process functions of the original program based on analyzing the original program; constructing a first mutated program, wherein constructing the mutated program comprises; constructing one or more mutants, wherein each mutant of the one or more mutants is constructed by distorting a portion of the original program code; and constructing the first mutant program based on embedding the one or more mutants in the original program code; map the one or more mutants to the one or more metamorphic relationships; implementing a first test by providing one or more predetermined test cases as input to the original program, wherein the original program provides an original test output in response to the first test; implementing a second test by providing the one or more predetermined test cases as input to the first mutated program, wherein the first mutated program provides a first mutated test output in response to the second test; determining whether the original program comprises at least one defect based on at least comparing the original test output to the mutated test output; in response to determining that the original program comprises the at least one defect, determine a first mutant of the one or more mutants associated with the at least one defect; identifying a first metamorphic relationship of the one or more metamorphic relationships mapped to the first mutant; transmitting, via the operative communication channel with the user device, a notification to the user indicating the at least one defect and the first metamorphic relationship; and in response to a defect correction input from the user, initiate correction of the original program code by at least modifying code associated with a first process function of the one or more process functions of the original program, thereby constructing a corrected original program code. - View Dependent Claims (18, 19, 20)
-
Specification