Support random mode in test scheduler