IP Library › Granted Patent US 9,396,097
Granted Patent B2
US 9,396,097 · App. 14/216,911 · Granted Jul 19, 2016

Methods, circuits, devices, systems and associated computer executable code for testing software code

Inventor: Eli Lopian (Tel Aviv, IL)
Assignee: TYPEMOCK LTD.
G06F11/3684G06F11/368
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,396,097
App. No.
14/216,911
Granted
Jul 19, 2016
Kind
B2
Abstract

Disclosed are methods, circuits, apparatuses, systems and associated computer executable code for generating a unit test. According to some embodiments, there is provided computerized system including test generation software, which software may include code analyzing logic to identify within a code under test or within an associated Code Statement Segment (CSS): (1) one or more dependencies, and (2) one or more fields read by the CUT or Associated CSS. The may also be include a code statement provider to provide: (1) at least one CSS constructed to resolve at least one identified dependency, and (2) at least one CSS constructed to modify at least one identified field.

Claims (34)

1. A system for generating a unit test for software code to be tested (Code Under Test “CUT”), said system comprising:

a processor and operating memory;

code analyzing logic adapted to analyze the CUT, and automatically identify within the CUT, by analyzing code instructions of the CUT or metadata of the CUT, one or more dependencies contained in the CUT and, for each given identified dependency, characteristics of code objects suitable to resolve the given identified dependency; and

a unit test generator adapted to generate a new unit test for the CUT and including a code statement provider adapted to create, for each individual identified dependency of the CUT, one or more Code Statement Segments (CSS's) constructed to return a code object having the identified characteristics associated with the individual identified dependency or modify a code object to match the identified characteristics associated with the individual identified dependency, so as to generate a unit test including CSS's configured to resolve each of the one or more identified dependencies.

2. The system according to claim 1 , further comprising an observer method controller to identify within the CUT and within any CSS an observer method, which observer method indicates a value associated with a field written to by the CUT by a CSS.

3. The system according to claim 2 , further comprising code execution processing logic to execute within a sandbox environment the: (1) CUT, (2) CSS, and (3) an observer method.

4. The system according to claim 3 , further comprising code execution assessment logic to assess one or more functional parameters of the CUT and the CSS during execution.

5. The system according to claim 4 , wherein said code execution assessment logic is adapted to assess parameters selected from the group consisting of: (1) code execution errors, (2) code execution exceptions, (3) values of data objects, (4) value transitions of data objects, and (5) code execution coverage.

6. The system according to claim 4 , further comprising validation logic adapted to validate a CSS for use as part of a unit test.

7. The system according to claim 6 , wherein said code statement generator is further adapted to operate in concert with said validation logic to modify, replace, add isolation code or prune a CSS responsive to an output of said code execution assessment logic.

8. The system according to claim 7 , further comprising code statement segment optimization logic adapted to operate in concert with said code statement generator to modify, replace, add isolation code or prune a CSS responsive to observer method outputs.

9. The system according to claim 8 , further comprising code statement segment storage adapted to store CSS's which have been validated or optimized.

10. The system according to claim 9 , further comprising test coverage assessment logic adapted to assess a cumulative code execution coverage provided by the stored code statement segments.

11. The system according to claim 10 , further comprising a unit test publishing module adapted to publish the stored code statement segments as a unit test upon the assessed cumulative code execution coverage reaching or exceeding a threshold level.

12. The system according to claim 1 , wherein said code statement provider provides a code statement segment by constructing the CSS to either resolve an identified dependency or to modify at least one identified field.

13. The system according to claim 12 , wherein said code statement provider provides a code statement segment by selecting a CSS stored in said storage and known to either resolve the identified dependency or to modify the identified field.

14. The system according to claim 7 , further comprising one or more mocking engines to provide mocked behavior through the isolation code.

15. The system according to claim 1 , wherein:

said code analyzing logic is further adapted to analyze the at least one CSS and automatically identify within the CSS, by analyzing code instructions of the CSS or metadata of the CSS, one or more dependencies contained in the CSS; and

said code statement provider is further adapted to generate at least one CSS constructed to resolve at least one identified dependency contained in the CSS.

16. The system according to claim 1 , wherein:

said code analyzing logic is further adapted to analyze the CUT, and automatically identify within the CUT, by analyzing code instructions of the CUT or metadata of the CUT, one or more fields to be read by the CUT; and

said code statement provider is further adapted to generate at least one CSS constructed to modify at least one field identified by said code analyzing logic to be read by the CUT.

17. The system according to claim 1 , wherein:

said code analyzing logic is further adapted to analyze the at least one CSS, prior to execution of the CUT and the at least one CSS, and automatically identify within the CSS, by analyzing code lines of the CSS or metadata of the CSS, one or more fields to be read by the CSS; and

said code statement provider is further adapted to generate at least one CSS constructed to modify at least one field identified by said code analyzing logic.

18. A system for generating a unit test for software code to be tested (Code Under Test “CUT”), said system comprising:

a processor and operating memory;

code analyzing logic adapted to analyze the CUT, and automatically identify within the CUT, by analyzing code instructions of the CUT, one or more dependencies contained in the CUT and, for each given identified dependency, characteristics of code objects suitable to resolve the given identified dependency; and

a unit test generator adapted to generate a new unit test for the CUT and including a code statement provider adapted to create, for each individual identified dependency of the CUT, Code Statement Segments (CSS's) constructed to return a code object having the identified characteristics associated with the individual identified dependency or modify a code object to match the identified characteristics associated with the individual identified dependency, so as to generate a unit test including CSS's configured to resolve each of the one or more identified dependencies.

19. A system for generating a unit test for software code to be tested (Code Under Test “CUT”), said system comprising:

a processor functionally associated with a digital memory, which digital memory stores processor executable code adapted to cause one or more processors to:

analyze the CUT, and automatically identify within the CUT, by analyzing code instructions of the CUT or metadata of the CUT, one or more dependencies contained in the CUT and, for each given identified dependency, characteristics of code objects suitable to resolve the given identified dependency; and

generate a new unit test for the CUT including creating, for each individual identified dependency of the CUT, a Code Statement Segment (CSS) constructed to return a code object having the identified characteristics associated with the individual identified dependency or modify a code object to match the identified characteristics associated with the individual identified dependency, so as to generate a unit test including CSS's configured to resolve each of the one or more identified dependencies.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 27, 2014
From: LOPIAN, ELI
To: TYPEMOCK LTD.
Reel/Frame 032535/0788 →
Continuity (2)
Provisional Application 61802692 · Mar 17, 2013
Related Publication 20140289708A1 · Sep 25, 2014