I could do that, but rather not, as it seems to me to be more a workaround 
than a solution. Creating a base class for specifications just to allow 
them to override a configuration value seems wrong, and I am concerned that 
it might come back to bite me later-on in the development (e.g if I'd 
actually want these specs to inherit behavior from existing base-specs, 
like common pre/post behaviour). I'd be happier confining specifications to 
deal w/test cases, and assign configuration to config files.

On Wednesday, January 17, 2018 at 7:48:01 PM UTC+11, Roman Tretyak wrote:
>
> Why can't you just change the baseUrl for certain test/set of tests? Have 
> a separate 'parent' test for each web app which will set the baseUrl. For 
> example by setting browser.setBaseUrl(..) or by overriding createConf 
> method (only for geb-spock I guess).
>
> -Roman
>
> среда, 17 января 2018 г., 5:14:55 UTC+2 пользователь Samuel Rossinovic 
> написал:
>>
>> Hi. 
>> Trying to reuse geb stuff across multiple web apps (different urls). In 
>> particular, I'd like to reuse config in GebConfig.groovy.
>> My GebConfig currently contains:
>> * baseUrl
>> * misc configuration (waiting, clear cookies, reportsDir, etc)
>> * environments (per-browser), as-well as some utility methods for those 
>> envs.
>>
>> Would be good if I was able to extract everything other than the baseUrl 
>> to a common config ancestor, and have separate projects, each with a config 
>> that only defines its URL, and inheriting the rest from the common one.
>>
>> Appreciate some guidance on this...
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/9ecc26e9-558f-458c-9db5-5e7651f6ab4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to