Methods and systems for generating test information from a source code
AssigneeZynga Inc.
InventorAleksandr Kuzmin
Life of this patent
Estimating the term…
Abstract
Systems and methods for generating test information from a source code are described. One of the methods includes accessing the source code. The method further includes receiving a modification of the source code to generate a modified source code. The modification includes one or more instructions that do not affect functions performed by executing the source code. The modification further includes one or more instructions for generating test information regarding each executable line of the source code.
Claims23
A method for generating test information from a source code, comprising:
- accessing the source code, wherein the source code includes a declaration line;
- receiving an instrumentation of the source code to generate a modified source code, the instrumentation including one or more instructions that do not affect functions performed by executing the source code, the instrumentation including prepending each executable line of the source code with the one or more instructions for generating test information regarding each executable line of the source code, wherein the test information is regarding operability associated with a corresponding one of the functions of each executable line;
- and
- testing each executable line of the source code without testing the declaration line,
- wherein said testing is performed to generate the test information that includes coverage information, the coverage information is regarding a number of times each executable line of the source code is executed during said testing,
- wherein said testing is performed to generate the test information that includes consumption information, the consumption information is regarding a percentage of a time cycle of a hardware resource each executable line of the source code consumes during said testing,
- wherein the method is performed by a processor.
A method for generating test information from a source code, comprising:
- accessing the source code, wherein the source code includes a declaration line;
- instrumenting the source code with one or more instructions, wherein said instrumenting the source code includes prepending each executable line of the source code with one or more instructions to provide coverage information related to each executable line of the source code or consumption information related to each executable line of the source code, wherein the coverage information or the consumption information is regarding operability associated with a corresponding function of each executable line, wherein prepending each executable line of the source code is performed to generate a modified source code;
- testing each executable line of the source code without testing the declaration line;
- providing the coverage information as a result of said testing, wherein said providing the coverage information comprises providing for display information regarding a number of times each executable line of the source code is executed during said testing;
- and
- providing the consumption information as a result of said testing, wherein said providing the consumption information comprises providing for display information regarding a percentage of a time cycle of a hardware resource consumed by each executable line of the source code during said testing,
- wherein the method is performed by a processor.
A computer system for generating test information from a source code, comprising:
- an input device for receiving an instrumentation of the source code from a user, wherein the source code includes a declaration line;
- an output device for providing test information,
- the test information including information related to coverage received by each executable line of the source code during the test,
- the test information further including information related to consumption of resources by each executable line of the source code;
- a memory device for storing the source code;
- and
- a processor for:
- accessing the source code from the memory device;
- generating a modified source code in response to receiving the instrumentation, the instrumentation including one or more instructions that do not affect functions performed by executing the source code, the one or more instructions prepended to each executable line of the source code for generating the test information for each executable line of the source code, wherein the test information is regarding operability associated with a corresponding one of the functions of each executable line;
- testing each executable line of the source code without testing the declaration line,
- wherein the instrumentation includes the one or more instructions for providing the coverage information related to each executable line of the source code, the coverage information including information regarding a number of times each executable line of the source code is executed during the test,
- wherein the instrumentation includes the one or more instructions for providing the consumption information related to each executable line of the source code, the consumption information including information regarding a percentage of a time cycle of a hardware resource consumed by each executable line of the source code during the test.
Dependencies are inferred from the claim text.