Abstracted testing parts of the runner into test_lib (#177)