Added code to allow tests to be run for different environments