add run function to run tests from within scripts