JPB-1349 Groovier BDD with Spock | Devoxx

Groovier BDD with Spock

Conference

methodevops Methodology & DevOps

Room 2 - Schibsted

Tuesday at 09:00 - 10:00

Do you create your BDD specifications in JBehave or Cucumber, but you hate it? Have you ever scared a business person by showing them a piece of JUnit test? There is no better, more meaningful and accurate way to communicate about the software we’re developing than tests, so we shouldn’t resign from telling the story about our product just because of crappy BDD tools.

Groovy and Spock are nice alternative to bake BDD specifications directly into the code. By creating domain-specific language it’s possible to create specification understandable both for both business and developers, with IDE support, refactoring and static analysis.

  • Tests are finally not divided into two separate files
  • It is real pleasure to create readable specification: developers can use all the goodness and syntactic sugar that comes with Groovy
  • No need to parse any values from strings into numbers/enums/custom formats - they already are Groovy objects with powerful syntax
  • Fancy automatic formatting with colours is done by IDE itself for free - tests are normal Groovy code
  • IDE navigation to underlying layers of test by CTRL+click
  • No need to do any regexp matching, use clumsy annotations and aliases
Michał Kordas Michał Kordas

Michał is working as a fully cross-functional member of strongly agile team acting as a technical tester, business analyst and developer with particular focus on quality, good requirements and efficient process. Unlike majority of QAs, he believes that being a truly good QA means being first of all software developer that is capable of delivering production-quality code with additional quality-related skills.