Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Geb:Save Time with GroovyFunctional TestingDallas, TXOctober 2012Discussion document – Strictly Confidential & Proprietary
Agenda …We will cover how a successful workflow for developing functional tests• Introductions• Interactive Shell  –   Bas...
Introductions                Geb: Save Time with Groovy Functional Testing                                               O...
Interactive Shell                    Geb: Save Time with Groovy Functional Testing                                        ...
Interactive Shell…Getting started with Geb in the interactive Groovy Shell• Firefox for Geb• Try out your tests before put...
Interactive Shell …Basic Geb syntax looks familiar, though there are some differences with jQuery• http://www.gebish.org/m...
Page Abstraction                   Geb: Save Time with Groovy Functional Testing                                          ...
Page Abstraction …Define the essence of the page in order to separate the concerns of testmethods and web elementsThese to...
Functional Testing                 Geb: Save Time with Groovy Functional Testing                                          ...
Functional Testing…Geb makes it easy to test natively in multiple browsers• Faster and easier to develop tests• Automated ...
Functional Testing…More Geb to come so follow along and share your techniques with thecommunity…More Geb to come…Follow al...
Recap and Questions                 Geb: Save Time with Groovy Functional Testing                                         ...
Upcoming SlideShare
Loading in …5
×

Geb: Save Time with Groovy Functional Testing

1,436 views

Published on

This was a presentation I gave in 10/2012 to the DFW Groovy/Grails User Group. The code examples I presented are available at https://github.com/jhamit/geb-examples . Also, there will be additional updates to the examples as I work through them that will be explained on my blog.

  • Be the first to comment

  • Be the first to like this

Geb: Save Time with Groovy Functional Testing

  1. 1. Geb:Save Time with GroovyFunctional TestingDallas, TXOctober 2012Discussion document – Strictly Confidential & Proprietary
  2. 2. Agenda …We will cover how a successful workflow for developing functional tests• Introductions• Interactive Shell – Basic setup – Syntax Overview• Page Abstraction – Overview – Modules – Functions• Functional Testing• Recap and Questions Geb: Save Time with Groovy Functional Testing October, 2012 2
  3. 3. Introductions Geb: Save Time with Groovy Functional Testing October, 2012 3
  4. 4. Interactive Shell Geb: Save Time with Groovy Functional Testing October, 2012 4
  5. 5. Interactive Shell…Getting started with Geb in the interactive Groovy Shell• Firefox for Geb• Try out your tests before putting them into code• Useful for rapid test development• http://groovy.codehaus.org/Groovy+Shell• https://github.com/jhamit/geb-examples Geb: Save Time with Groovy Functional Testing October, 2012 5
  6. 6. Interactive Shell …Basic Geb syntax looks familiar, though there are some differences with jQuery• http://www.gebish.org/manual/current/Key Objects• geb.Browser• geb.navigator.Navigator• geb.js.JavascriptInterfaceNice Features• DOM Inspection via CSS Selectors, Indexes, Attributes• DOM Interaction via b.$.click()• DOM Manipulation via jQuery HookExamples• b.title• b.$(div.content-main)• b.$(div.tweet).first().find(a[href="/improving"],0) Geb: Save Time with Groovy Functional Testing October, 2012 6
  7. 7. Page Abstraction Geb: Save Time with Groovy Functional Testing October, 2012 7
  8. 8. Page Abstraction …Define the essence of the page in order to separate the concerns of testmethods and web elementsThese tools allow flexibility in page design without breaking tests• Page – Conceptual abstraction of a URLs• Page Module - Sections that are reusable across multiple pages• Page Method – Actions that are used frequently on pages Geb: Save Time with Groovy Functional Testing October, 2012 8
  9. 9. Functional Testing Geb: Save Time with Groovy Functional Testing October, 2012 9
  10. 10. Functional Testing…Geb makes it easy to test natively in multiple browsers• Faster and easier to develop tests• Automated report generation• Easily invoked from command line• Can be incorporated into build/deployment process• Point to other environments with native browsers via geb.build.baseUrl Geb: Save Time with Groovy Functional Testing October, 2012 10
  11. 11. Functional Testing…More Geb to come so follow along and share your techniques with thecommunity…More Geb to come…Follow along @josh_hamit or JoshHamit.com• Configurable page instances• Module lists Geb: Save Time with Groovy Functional Testing October, 2012 11
  12. 12. Recap and Questions Geb: Save Time with Groovy Functional Testing October, 2012 12

×