Add test mode with --test