System, method, and computer program for determining incremental code coverage of a software project
AssigneeAmdocs Development Limited
InventorsSwatantra Jain, Ankit Nevatia, Dhruv Upadhyaya
Life of this patent
Estimating the term…
Abstract
A system, method, and computer program product are provided for determining incremental code coverage of a software project. In operation, a system provides computation of project specific incremental (delta) code coverage in parallel in scenarios of multiple project teams working on different projects on a same module (or in the same repository). Further, an incremental code/mutation coverage analyzer engine associated with the system may be integrated with a project management tool and a version control software to obtain the changed code lines with respect to each project, using what it calculates as the incremental code and/or the mutation coverage.
Claims7
A method, comprising:
- retrieving, by a system, a plurality of changelists associated with a plurality of software projects operating on a same source code of a program, wherein each changelist of the plurality of changelists indicates portions of the source code of the program that are changed by a corresponding software project of the plurality of software projects;
- identifying, by the system, one or more changed lines with respect to changed code within the program, utilizing the plurality of changelists, including for each changelist of each corresponding software project:
- determining, from the changelist, one or more files associated with the program that are changed by the software project, and
- comparing each file of the one or more files to an immediate previous version of the file to identify lines of code within the one or more files that are changed by the software project;
- obtaining, by the system, overall test coverage for the entire program in association with all of the plurality of software projects, by determining for each line of each file of each software project which instructions at the line are covered by unit tests for the software project;
- assessing, by the system, test coverage for the one or more changed lines in each software project of the plurality of software projects, from the overall test coverage obtained for the entire program;
- calculating, by the system independently for each software project of the plurality of software projects, incremental test coverage for the lines of code changed by the software project by:
- collating the overall test coverage obtained for the entire program by software project to compute a percentage of test coverage for each software project of the plurality of software projects;
- and
- reporting, by the system, the incremental test coverage calculated for each software project of the plurality of software projects.
A non-transitory computer readable medium storing computer code executable by a processor to perform a method comprising:
- retrieving, by a system, a plurality of changelists associated with a plurality of software projects operating on a same source code of a program, wherein each changelist of the plurality of changelists indicates portions of the source code of the program that are changed by a corresponding software project of the plurality of software projects;
- identifying, by the system, one or more changed lines with respect to changed code within the program, utilizing the plurality of changelists, including for each changelist of each corresponding software project:
- determining, from the changelist, one or more files associated with the program that are changed by the software project, and
- comparing each file of the one or more files to an immediate previous version of the file to identify lines of code within the one or more files that are changed by the software project;
- obtaining, by the system, overall test coverage for the entire program in association with all of the plurality of software projects, by determining for each line of each file of each software project which instructions at the line are covered by unit tests for the software project;
- assessing, by the system, test coverage for the one or more changed lines in each software project of the plurality of software projects, from the overall test coverage obtained for the entire program;
- calculating, by the system independently for each software project of the plurality of software projects, incremental test coverage for the lines of code changed by the software project by:
- collating the overall test coverage obtained for the entire program by software project to compute a percentage of test coverage for each software project of the plurality of software projects;
- and
- reporting, by the system, the incremental test coverage calculated for each software project of the plurality of software projects.
A system, comprising:
- a non-transitory memory storing instructions;
- and
- one or more processors in communication with the non-transitory memory that execute the instructions to perform a method comprising:
- retrieving a plurality of changelists associated with a plurality of software projects operating on a same source code of a program, wherein each changelist of the plurality of changelists indicates portions of the source code of the program that are changed by a corresponding software project of the plurality of software projects;
- identifying one or more changed lines with respect to changed code within the program, utilizing the plurality of changelists, including for each changelist of each corresponding software project:
- determining, from the changelist, one or more files associated with the program that are changed by the software project, and
- comparing each file of the one or more files to an immediate previous version of the file to identify lines of code within the one or more files that are changed by the software project;
- obtaining overall test coverage for the entire program in association with all of the plurality of software projects, by determining for each line of each file of each software project which instructions at the line are covered by unit tests for the software project;
- assessing test coverage for the one or more changed lines in each software project of the plurality of software projects, from the overall test coverage obtained for the entire program;
- calculating, independently for each software project of the plurality of software projects, incremental test coverage for the lines of code changed by the software project by:
- collating the overall test coverage obtained for the entire program by software project to compute a percentage of test coverage for each software project of the plurality of software projects;
- and
- reporting, by the system, the incremental test coverage calculated for each software project of the plurality of software projects.
Dependencies are inferred from the claim text.