---
title: "DataFresh - Database rollback library for unit tests"
url: "https://osherove.com/blog/2006/10/14/datafresh-database-rollback-library-for-unit-tests.md"
canonical: "https://osherove.com/blog/2006/10/14/datafresh-database-rollback-library-for-unit-tests.html"
published: "2006-10-14T00:42:38"
updated: "2006-10-14T00:42:38"
tags: ["Agile", "Agile Related", "Art Of Unit Testing", "Testing Guidelines", "Unit Testing"]
author: "Roy Osherove"
description: "A while ago I wrote an article about database unit testing , and the various ways you could \"rollback\" the database state to the way it was before the test ran. Today I got an interesting comment from Mike Brockey : \"I…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# DataFresh - Database rollback library for unit tests

By Roy Osherove October 14, 2006 In [Agile](https://osherove.com/blog/category/agile), [Agile Related](https://osherove.com/blog/category/agile-related), [Art Of Unit Testing](https://osherove.com/blog/category/art-of-unit-testing), [Testing Guidelines](https://osherove.com/blog/category/testing-guidelines), [Unit Testing](https://osherove.com/blog/category/unit-testing)

**Historical article** · Originally published October 14, 2006; technical details may be outdated.

A while ago I wrote an [article about database unit testing](http://weblogs.asp.net/rosherove/pages/DbUnitTesting.aspx), and the various ways you could "rollback" the database state to the way it was before the test ran.

Today I got an interesting comment from [Mike Brockey](http://blogs.ent0.com/blogs/mikebrockey/default.aspx):

> "I have yet another solution to this very common problem. We have been able to isolate the steps for preparing a database snapshot, tracking the database modifications and then refreshing the modified tables back to their original state all using built in SQL statements.  We call it dataFresh and it is available now from our website as part of our TDD Developer's Toolkit, all free of charge.
>
> [http://blogs.ent0.com/blogs/datafresh/default.aspx](http://blogs.ent0.com/blogs/datafresh/default.aspx)"

the downloads section on the site is [over here](http://blogs.ent0.com/files/default.aspx). I haven't tried it yet, but it looks interesting. Thanks Mike!

## More in Agile

[All posts in Agile](https://osherove.com/blog/category/agile)

- Nov 7, 2006

    ### [Agile Development Sessions - Slides and Demos from TechEd](https://osherove.com/blog/2006/11/7/agile-development-sessions-slides-and-demos-from-teched.html)

- Oct 15, 2006

    ### [MassDataHandler: generate test data to help with data layer testing](https://osherove.com/blog/2006/10/15/massdatahandler-generate-test-data-to-help-with-data-layer-t.html)

- Oct 11, 2006

    ### [Good Agile, Bad Agile](https://osherove.com/blog/2006/10/11/good-agile-bad-agile.html)

- Oct 10, 2006

    ### [The Art Of Unit Testing - Download Chapter 1](https://osherove.com/blog/2006/10/10/the-art-of-unit-testing-download-chapter-1.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
