IP Library › Granted Patent US 9,934,132
Granted Patent B2
US 9,934,132 · App. 14/840,062 · Granted Apr 3, 2018

Determining code coverage of an application by test(S)

Inventors: Aharon Abadi (Petach Tikva, IL); Moria Abadi (Petach Tikva, IL); Idan Ben-Harrush (Givat Elah, IL); Samuel Kallner (D.N. Menashe, IL)
Assignee: International Business Machines Corporation
G06F11/3676G06F11/3684
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,934,132
App. No.
14/840,062
Granted
Apr 3, 2018
Kind
B2
Abstract

A method of determining code coverage of an application by test(s) (wherein code may include UI elements). The method comprises executing a code test on at least one portion of a tested code of an application in one or more iterations, wherein in each one of the plurality of iterations, selecting at least one of a plurality of atomic code elements of the tested code, applying the code test on a version of the code that does not include the at least one selected atomic element, and classifying the at least one selected atomic element as covered by the code test when the code test fails and as not covered in the code test when the code test passes.

Claims (42)

1. A method for determining code coverage of an application by test(s), comprising:

executing, by at least one processor, a test for code testing, on at least one portion of a code under test of an application in a plurality of iterations, wherein in each one of said plurality of iterations:

selecting, by said at least one processor, at least one of a plurality of atomic code elements of said code under test,

creating, by said at least one processor, a version of said code under test that does not include said at least one selected atomic element,

testing, by said at least one processor, said version by executing said test on said version,

determining, by said at least one processor, whether said version passes or fails said testing by said test, and

classifying, by said at least one processor, said at least one selected atomic element as covered by said test when said test fails when testing said version and as not covered by said test when said test passes when testing said version;

wherein an effort of said executing is reduced by that that said testing in each of said plurality of iterations is conducted without changing said test.

2. The method of claim 1 , further comprising analyzing said code under test to detect a plurality of atomic code elements of said code under test.

3. The method of claim 1 , wherein each of at least some of said plurality of atomic code elements comprises one or more code fractions with code instructions to generate a certain screen or a window of said application.

4. The method of claim 1 , wherein each of at least some of said plurality of atomic code elements comprises one or more code fractions of interactive elements with code instructions to generate a graphical user interface (GUI) element.

5. The method of claim 1 , wherein each of at least some of said plurality of atomic code elements comprises one or more code fractions of interactive elements with code instructions to generate an input field.

6. The method of claim 1 , wherein each of at least some of said plurality of atomic code elements comprises one or more code fractions of interactive elements with code instructions to generate media display tool of a certain screen or a window of said application.

7. The method of claim 1 , wherein each of at least some of said plurality of atomic code elements comprises one or more code fractions with code instructions to execute a transition between screens or windows of said application.

8. The method of claim 1 , wherein each of at least some of said plurality of atomic code elements comprises one or more code fractions of elements with code instructions to generate application events of said application.

9. The method of claim 1 , wherein each one of said plurality of atomic code elements comprises code fraction having code instructions encoded in a programming language.

10. The method of claim 1 , wherein each one of said plurality of atomic code elements comprises code instructions having an event handler.

11. The method of claim 1 , wherein each one of said plurality of atomic code elements comprises code instructions having a screen initialization code.

12. The method of claim 1 , wherein said creating said version comprises generating said version by disabling at least one function in said at least one selected atomic element.

13. The method of claim 1 , wherein said creating said version comprises generating said version by generating a copy of said code under test without said at least one selected atomic element.

14. The method of claim 1 , wherein said executing said test on said version comprises blocking at least one event defined in said at least one selected atomic element.

15. The method of claim 1 , wherein said executing said test on said version comprises instructing a module executing said test to ignore said at least one selected atomic element.

16. A non-transitory computer readable medium comprising computer executable instructions adapted to perform the method of claim 1 .

17. A system for determining code coverage of an application by test(s), comprising:

an interface adapted to receive a code under test and a test for code testing;

a memory storing a code coverage test code;

at least one processor for executing said code coverage test code for executing;

code instructions for executing said test on at least one portion of said code under test in a plurality of iterations, wherein in each one of said plurality of iterations:

selecting at least one of a plurality of atomic code elements of said code under test,

creating a version of said code under test that does not include said at least one selected atomic element,

testing said version by executing said test on said version,

determining whether said version passes or fails said testing by said test, and

classifying said at least one selected atomic element as covered by said test when said test fails when testing said version and as not covered by said test when said testing code passes when testing said version;

wherein an effort of said executing is reduced by that that said testing in each of said plurality of iterations is conducted without changing said test.

18. A computer program product for determining code coverage of an application by test(s), the computer program product comprising a non transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by at least one processor to cause a computing device to:

execute by said at least one processor a test for code testing, on at least one portion of a code under test of an application in a plurality of iterations, wherein in each one of said plurality of iterations said at least one processor executes instructions for:

selecting at least one of a plurality of atomic code elements of said code under test,

creating a version of said code under test that does not include said at least one selected atomic element,

testing said version by executing said test on said version,

determining whether said version passes or fails said testing by said test, and

classifying said at least one selected atomic element as covered by said test when said test fails when testing said version and as not covered by said test when said testing code passes when testing said version;

wherein an effort of said execution is reduced by that that said testing in each of said plurality of iterations is conducted without changing said test.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 2, 2015
From: ABADI, AHARON; ABADI, MORIA; BEN-HARRUSH, IDAN; KALLNER, SAMUEL
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 036472/0207 →
Continuity (1)
Related Publication 20170060733A1 · Mar 2, 2017