1. A method of generating a test case for testing a program, the program containing a set of computer-readable instructions recorded on a computer-readable medium, at least some of the instructions being conditionally executable by a processor upon occurrence of a constraint, the method comprising executing instructions by a processor to perform: a) analyzing at least some of the instructions to identify basic blocks and superblocks and to determine the constraints thereof, each basic block containing at least one executable instruction, each superblock containing a plurality of basic blocks, wherein all basic blocks of each superblock require execution whenever any basic block thereof requires execution; b) determining respective weights of superblocks, each weight representative of a number of basic blocks which require execution when the superblock is executed; c) determining the constraints which cause a superblock having a high weight to be executed; and d) using the determined constraints to generate at least one test case which, upon execution of the program, is capable of causing the high-weighted superblock to be executed.