test: Refactor TestRun

Signed-off-by: Lewis Marshall <lewis@lmars.net>