Abstract testExec pattern in grading_tests