I want to write and end to end test that involves 2 systems
www.sys1.com
www.sys2.com
The process that im trying to test starts with system 1 and eventually I will be able to see changes in system 2. When I start my tests, I pass the following parameter to geb
-Dgeb.build.baseUrl=http://www.sys1.com/
I want somehow in the middle of my test to reconfigure the baseUrl so i can navigate to pages in www.sys2.com
Is this possible? if so how?
Tech stuff:
This is possible by using browser.setBaseUrl:
APage:
class APage extends Page
{
static url = "myUrl/"
}
Geb Config:
baseUrl = "http://www.google.com/"
Example:
browser.to(APage) //Goes to http://www.google.com/myUrl/
browser.setBaseUrl("http://www.mynewurl.com/") // sets new baseUrl
browser.to(APage) //Goes to http://www.mynewurl.com/myUrl/