Add guard to automate running tests