I’ve created a test-type for selenium types, and now I’d like to use grails.serverURL as the base url for the system under test.
Using ConfigSlurper on Config.groovy doesn’t pick up the environmentally-conditioned grails.serverURL, and ConfigurationHolder.config is null.
How do I access grails.serverURL in unit tests? (Really my custom-test-phase that runs like a unit test)
You need to pass
GrailsUtil.environmentto theConfigSlurperconstructor.