Hi, I´m trying to use Geb for automated infrastructure tests in multiple environments - and later on for regression tests. My Infrastructure has some Apache´s and Application Servers which are connected, each with a different baseURL:
// DEV environment for example .. https://mycompany/myApache https://mycompany/myApache:1000 https://mycompany/myApache:2000 https://mycompany/myAppServer:1111 https://mycompany/myAppServer:2222 .... I´m executing all *Spec tests from Maven (3.3.3) , using the PhantomJsDriver (2.1.1), setup with the phantomjs-maven-plugin. For testing the global setup (proxy, network, ....) I´ve also created a simple InternetAccessSpec: class GoogleHomePage extends Page { static url = "http://www.google.com" static at = { title == "Google" } } class InternetAccessSpec extends GebReportingSpec { def internetURLReachable() { when: browser.to GoogleHomePage then: browser.page.verifyAt() } } This spec is running fine, but the next Specs - running on different baseUrls - are all failing - changing the baseUrl seems not to work: class PayaraAdminPage extends Page { static url = "index.html" static at = { title == "Login" } } class PayaraSpec extends GebReportingSpec { def @Shared GPathResult adminServer def setupSpec() { .. adminServer = readFromJSon() } def String adminInstanceURL() { String hostname = adminServer.hostname String port = adminServer.port return "https://${hostname}:${port}/" } /** * Test Login Page shows up. */ def "admin console available"() { given: browser.go adminInstanceURL() when: browser.to PayaraAdminPage then: browser.page.verifyAt() } /** * Test *'server running' is displayed */ @Unroll def "server running at #baseUrl"(String baseUrl) { given: browser.go baseUrl when: browser.to PayaraPage then: browser.page.verifyAt() where: baseUrl << myData.collect { "https://${it.hostname.text()}:${it.sslport.text()}/" } } } In the screenshots created by GebReportingSpec i still see "Google" displayed in the browser. What am I doing wrong here ? As far as I understood the docs, setting the baseUrl is possible at startup (GebConfig), as well as in the prepartion of a GebSpec. Thanx for any advice, Torsten -- 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/d9a1bf89-f095-4034-aa54-6aff120e3993%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
