A method for testing a computer program that includes software code
arranged to be executed in multiple threads, including at least a first
thread and one or more other threads. The method includes identifying an
output statement in the first thread, running the software code so as to
generate an output due to the output statement, and intervening in the
program so that when the program is run, execution of the first thread is
blocked prior to the output statement while the one or more other threads
continue to execute. The output generated after intervening in the
program is examined in order to detect a fault in the program.