
Stefan Rufer

Michael Wernli
(3020) Let the Continuous Build Embrace Your Database
Technical long talk 50 min
Wednesday, 2008-06-25, 16:30 - 17:20, Arena 3
- Stefan Rufer - Netcetera (speaker)
- Michael Wernli - Telekurs Card Solutions (co-speaker)
Topics
Abstract
"JUnit tests should not depend on database state." - "Set up your
test data before you run your test." - We figure this just does not always
scale. Mocking test data for hundreds of tables may not be suitable and database
schemes evolve as the application does.
These are common challenges when developing large J2EE systems. This
presentation shows practical approaches for project setups and (functional)
tests that decided to depend on a database. Developers and build servers may or
may not share the database and support for this should be as simple as possible.
We give an overview of what proved to be a good setup for an Eclipse / Maven 2
based development and build environment that relies on an evolving relational
schema.
Extending the well known JUnit test suite with a few classes makes database
tests a lot easier. Rolling back all the DB operations that happened during a
test case guarantees re-runnable tests and a clean database.
In addition to this basic infrastructure we learned that a continuous database
build rises the quality of the DB deliveries. Detection of application and
database incompatibilities is not any more an issue of integration testing but
of an automated continuous build run.






