Move test wrapper to script