I am currently in the process of trying to update our project's from 4.0 to
5.1. Currently on 4.0, we have a BaseTest class that extends
GebReportingSpec and then all other test classes extend BaseTest. In
GebConfig.groovy, I have some lines that set different environment
variables such as "runOnGrid" which is true/false, "browserType" which is a
string, "env" which is the environment, etc....
We have some @IgnoreIf statement in our code to prevent running on certain
environments like Production. For example, we have an entire test class
"TestClassA" that can run on pre-prod but we want to ignore the whole class
for Prod. We put an @IgnoreIf annotation on the class that looks at
`System.getProperty("env") == "prod"`
This is currently working beautifully in 4.0. However in 5.1 this is no
longer working as `System.getProperty("env")` is coming back as null along
with all of the other variables we have set. These variables are set by
the time we hit the setupSpec() in BaseTest, but they are null prior to
that when they were not before. So it seems like before 5.0,
GebConfig.groovy was getting run earlier is the compilation process
perhaps? I guess I don't know how it all works, but I just know now that
with Geb 5 this method is no longer working for us.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/48ca1e2e-1d11-4312-b2b9-04c2dc91b012n%40googlegroups.com.