Leveraging Modules in Geb

Geb Page and Module classes are just regular Groovy classes. In addition to the contentDSL you can declare methods just as you would in any other class. Those methods can use content properties directly. Page object methods tend to fall into two categories: Observers report on some aspect of page state (e.g. whether a user is logged in or not). … Continue reading Leveraging Modules in Geb


Groovy Elvis Operator

What is this Elvis Operator I vaguely recall? I’ll get to that just bear with me for a minute. In Java I’ve seen too many null checks like the following: Its handy to have the Groovy Truth so we don’t have to do null checks. Instead of writing if (something != null) { ... } … Continue reading Groovy Elvis Operator

Modelling repeating structures with Geb page objects

Geb is the hot new thing in Grails functional testing. One of its most powerful features is the concise DSL for defining page objects. The reasons for using page objects are well enumerated elsewhere but the basic point is to allow your tests to interact with pages in a manner agnostic of the detail of their … Continue reading Modelling repeating structures with Geb page objects