The design and implementation of automata-based testing environment for Java multi-thread programs
Heui-Seok Seo, In-Sang Chung, Byeong Man Kim, Yong Rae Kwou · 2005
Deterministic execution testing has been considered a promising method for concurrent program testing because of its reproducibility. However, since deterministic execution requires that a synchronization sequence to be replayed is feasible and valid, it is not directly applicable to a situation in which synchronization sequences, being valid but infeasible, are taken into account. To resolve this problem, we proposed automata-based testing in previous work, where a concurrent program is executed according to one sequence accepted by the automaton recognizing all sequences semantically equivalent to a given sequence. In this paper, we present the automata-based testing environment for Java multi-thread programs, and design and implement key components-automata generator, program transformer and replay controller. Algorithms for generating the equivalence automaton of a given sequence are presented and a program transformation method is suggested in order to guide a program to be executed according to the sequence accepted by the automaton. The replay controller is also redesigned and implemented to adopt the automaton. By illustrating automata-based testing procedures with the gas station example, we show how the proposed approach works in Java multi-threaded programs.