TDD Database Boot Camp
Motivation
The practice of Agile Software Development requires, among other things, a high degree of flexibility in the coding process. As we get feedback from clients, stakeholders, and end users, we want to be able to evolve our design and functionality to meet their needs and expectations.
This implies an incremental process, with frequent (almost constant) change to the code we're working on. Each change is an opportunity to make the product more appropriate to the needs it is intended to address.
Most software products depend on databases to some extent. In order for the product to be flexible, its databases have to be able to adapt to new needs in the same way its software components should.
Traditionally, changing a deployed database is a stressful prospect, one which we have tended to shy away from. For many Agile teams, the database component of their product(s) remains a thorn in their side: Databases are difficult to test and risky to upgrade.
Many teams either cling to traditional Agile practices, which are optimized for software development, or attempt to manage their databases with traditional waterfall practices. Some Agile practices do not work with databases unaided – that’s not the domain in which they were developed. Having a dependency on a database which is managed with waterfall practices is even worse: your application is supposed to change but the database it uses is not?
Everything you know about Agile Software Development applies to databases. However, there are additional techniques required to make agility work when maintaining a database. This Test-Driven Database Boot Camp is intended to teach you those new techniques.
What you learn
Students learn to develop databases driven from tests. This includes a re-exploration of standard testing practices (acceptance and unit testing) as they pertain to databases as well as discovery of new practices.Students will learn how to write new databases in a Test-Driven way as well as how to upgrade and maintain existing ones.
Finally, students will learn how to use DataConstructor, which is a tool that assists in Test-Driven database development (TDDD).
Course Length
2 daysCourse Level
IntermediateCourse Outline
Day 1: Introduction
- An overview of the motivations behind Agility, and TDD specifically
- A discussion of some of the fundamental differences between software and database development
- A short discussion of how existing TDD techniques apply
- An introduction of the new techniques required to complete the database TDD picture
- As a group, we get the testing framework up and running on all needed machines
- As a group, we install DataConstructor on any machines that need it
- The concept of "Transition testing"
- A transition testing exercise
Day 2: In Depth
- Overview of DataConstructor’s features
- Developing databases in small increments
- Setup of demo test-driven databases with representative structure and data
- Hands-on legacy database transition workshop
- Debrief
Who is this course for
Software or data developers who want to learn how to design and deploy databases with a higher degree of certainty, and with the ability to change databases in an Agile way.
Room Setup and Equipment Needed
- A laptop or desktop computer with NUnit, VSTS testing, or some other .NET testing framework installed and a .NET IDE with which they are comfortable working is needed for every pair of participants.
- Each group will need access to a database server that can safely be destroyed and rebuilt many times.
- Each student receives a license to the DataConstructor tool as part of the course.
Prerequisites
Participants should have a solid background in TDD as it pertains to software development or have taken Net Objectives' Sustainable Test-Driven Development course.
- A preparatory resource to supplement your background in TDD:
- Rethinking Agility in Databases technical articles