Patent ID: 8516445

Claim:
A method for determining coverage of testing of a software under test (SUT), comprising: defining predicates to be used for coverage determination, the predicates include at least a first Boolean predicate and a second Boolean predicate, wherein the first Boolean predicate is a local predicate that is calculable over a first section of the SUT and non-calculable on any other portion of the SUT, wherein the second Boolean predicate is a global predicate that is calculable over each element of the SUT; for substantially each exercised element of the SUT which was exercised during a testing of the SUT, determining, for each predicate of the predicates, whether the predicate is calculable for the exercised element, and in response to a determination that the predicate is calculable, evaluating the predicate, wherein said determining whether the predicate is calculable is performed by determining, for each variable based on which a value of the predicate is defined, whether the variable is defined in the exercised element of the SUT, whereby calculable sections of the predicate are determined based on a scope in which local variables of the predicate are calculable; determining coverage of the testing of the SUT based on the exercised elements and the predicates, wherein said determining coverage comprises: determining a first coverage measurement of the testing of the SUT based on a ratio between a number of exercised elements for which the first Boolean predicate is evaluated to a predetermined value and a number of exercised elements of the SUT; determining a second coverage measurement of the testing of the SUT based on a ratio between a number of exercised elements for which the first Boolean predicate is evaluated to the predetermined value and a number of exercised elements of the SUT for which the first Boolean predicate is calculable; and determining a third coverage measurement of the testing of the SUT based on a ratio between a number of exercised elements for which the second Boolean predicate is evaluated to the predetermined value and a number of exercised elements of the SUT; and outputting the determined coverage by visually indicating to a user the first, second and third coverage measurements; whereby avoiding evaluation of the first Boolean predicate when the first Boolean predicate is non-calculable; whereby the user is provided with information regarding predicates that have different scopes in which they are calculable; whereby the user is provided with information filtering out non-calculable sections with respect to the first Boolean predicate and with unfiltered information.