Patent ID: 8745592

Claim:
A computer-implemented method for generating a test suite for a software program, comprising: obtaining a set of inputs for the software program, the software program comprising a set of elements; determining a coverage of the software program associated with the set of inputs by: determining a set of individual coverages associated with the inputs, wherein each of the individual coverages corresponds to a portion of the software program covered by one of the inputs; and obtaining the coverage of the software program as union of the individual coverages; selecting a subset of the inputs that provides the same coverage of the software program as the set of inputs from which the subset is selected by: generating an element array that includes an entry for each element of the set of elements of the software program; ordering the set of inputs based on an increasing size of the individual coverages of the inputs such that for a first input with a first individual coverage and a second input with a second individual coverage, the first input ordered before the second input when the first individual coverage is less than the second individual coverage; assigning the ordered inputs to entries of the element array based on the ordering such that the first input is assigned before the second input, wherein an input of the ordered inputs is assigned to an entry of the element array when the input covers the element of the software program corresponding to the entry; and when a subsequent input from the ordered inputs is assigned to an entry of the element array already having a previous input from the ordered inputs assigned thereto, wherein the individual coverage of the subsequent input includes the individual coverage of the previous input, overwriting the assignment of the previous input with an assignment of the subsequent input to the element; altering one or more inputs of the selected subset of inputs; and after altering the one or more inputs, using the subset of inputs as the test suite for the software program.