In the gambler's ruin algorithm on the cyclic group Z(n) = {0, 1, ..., n - 1} we consider arrival time at 0 starting from a fixed point x not equal 0 and use several versions of arrival time algorithm to test pseudorandom number generators. This kind of test based on the exact probability density for a random walk on a finite group is done for the first time. The test results show hidden defects in some generators such as combined multiple recursive generators and Mersenne Twister generators. (C) 2007 Elsevier Inc. All rights reserved.