Simplify code pertaining to running all testscases in controller