Skip to Main Content
Cucumber Recipes
book

Cucumber Recipes

by Ian Dees, Matt Wynne, Aslak Hellesoy
February 2013
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 45m
English
Pragmatic Bookshelf
Content preview from Cucumber Recipes
Recipe 18Drive a Spring + Hibernate Project

Problem

You want use Cucumber to test a Java application using Spring and Hibernate for persistence. You want your tests to be isolated by database transactions so that your data doesn’t leak from test to test.

Ingredients

  • The Spring application development framework[111]

  • The Hibernate ORM library[112]

  • A database system such as HSQLDB[113]

  • Cucumber-JVM[114] to drive your Java code from Cucumber

  • Maven[115] to install the libraries you’ll need

Solution

Building an app with Spring can save you a lot of time, but you need to coordinate several moving parts: object-relational mappings, database transactions, and so on. In this recipe, we’re going to put together a Cucumber test to drive just one aspect of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cucumber Cookbook

Cucumber Cookbook

Shankar Garg
Basiswissen Softwaretest , 6th Edition

Basiswissen Softwaretest , 6th Edition

Andreas Spillner, Tilo Linz
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths

Publisher Resources

ISBN: 9781941222607Errata