Adding automatic test mode