run tests automatically when an api key is passed in