switch test command to script