---
title: "Nightly build wins again"
url: "https://osherove.com/blog/2009/7/25/nightly-build-wins-again.md"
canonical: "https://osherove.com/blog/2009/7/25/nightly-build-wins-again.html"
published: "2009-07-25T14:37:01"
updated: "2009-07-25T14:37:01"
tags: ["Agile", "Unit Testing"]
author: "Roy Osherove"
description: "Here’s an email message the dev lead at our company sent out tonight: “Hi, I analyzed the nightly build failure - it broke because of an examples test that tests recursive fakes, and incidentally uses WhenCalled() on a…"
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/"
---

# Nightly build wins again

By Roy Osherove July 25, 2009 In [Agile](https://osherove.com/blog/category/agile), [Unit Testing](https://osherove.com/blog/category/unit-testing)

**Historical article** · Originally published July 25, 2009; technical details may be outdated.

Here’s an email message the dev lead at our company sent out tonight:

_“Hi,
I analyzed the nightly build failure - it broke because of an examples test that tests recursive fakes, and incidentally uses WhenCalled() on a property getter on the 2nd level of the recursive fake. This does not work because of a hidden bug - WhenCalled() should reset the recursive fake property setter, and when it is called true properties should be off. This bug has been there for a long time, and only the bug fix for recursive fakes with true properties unveiled it.
I will take two actions to resolve this:
1\. add a test for this scenario to our normal unit tests
2\. implement the fix above - 1/2 hour of work
Please pay close attention to the build status until then - the nightly breaks because of this examples test. Any other test failure should raise a flag.”_

I was thrilled to read this. Our automated nightly builds also run all the “example” tests that ship with Typemock Isolator. A couple months back we found out that this was not being done, and added it to the build process. The bug found here is the type that can remain hidden and even if you do TDD there are always chances of not thinking about tests that kind of corner cases.

In this case, not only did the nightly build uncover a bug that would have been embarrassing to find at the customer site (“silly typmock, their own example tests don’t even pass on a newly installed machine!”) but uncovered a buried problem, by chance.

lesson: automate and test as much as you can. even examples that you produce with your product.

## More in Agile

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

- Aug 11, 2009

    ### [Uncle bob and the Art of Unit Testing](https://osherove.com/blog/2009/8/11/uncle-bob-and-the-art-of-unit-testing.html)

- Jul 28, 2009

    ### [Webinar: Driving unit testing in the organization](https://osherove.com/blog/2009/7/28/webinar-driving-unit-testing-in-the-organization.html)

- Jul 22, 2009

    ### [Lean and Kanban Videos](https://osherove.com/blog/2009/7/22/lean-and-kanban-videos.html)

- Jul 9, 2009

    ### [Minimizing unit Test Fragility – 8 features in Typemock Isolator to help](https://osherove.com/blog/2009/7/9/minimizing-unit-test-fragility-8-features-in-typemock-isolat.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/
