Use global variable to check if tests are running