Tag: tdd

  • Unit tests are your specification

    Unit tests are your specification

    Recently a Schalk Cronjé forwarded me a tweet from Joshua Lewis about some unit tests he’d written. . @ysb33r I’m interested in your opinion on how expressive these tests are as documentation https://t.co/YpB1A3snUV /@DeveloperUG — Joshua Lewis (@joshilewis) December 3, 2015 I took a quick look and thought I may as well turn my comments…

  • Making a meal of architectural alignment and the test-induced-design-damage fallacy

    Making a meal of architectural alignment and the test-induced-design-damage fallacy

    Starter A few days ago Simon Brown posted a thoughtful piece called “Package by component and architecturally-aligned testing.” The first part of the post discusses the tensions between the common packaging approaches package-by-layer and package-by-feature. His conclusion, that neither is the right answer, is supported by a quote from Jason Gorman (that expresses the essence…

  • Diamond recycling (and painting yourself into a corner)

    Diamond recycling (and painting yourself into a corner)

    The post I wrote recently on recycling tests in TDD got quite a few responses. I’m going to take this opportunity to respond to some of the points that got raised. Do we really need to use the term “recycling”? The TDD cycle as popularly taught includes the instruction to “write a failing test”. The point…

  • Recycling tests in TDD

    Recycling tests in TDD

    The standard way that TDD is described is as Red-Green-Refactor: Red: write a failing test Green: get it to pass as quickly as possible Refactor: improve the design, using the tests as a safety net Repeat TL;DR; I’ve found that step 1) might be better expressed as: Red: write a failing test, or make an…

  • Using SpecFlow on Mono from the command line

    Using SpecFlow on Mono from the command line

    SpecFlow is the open source port of Cucumber for folk developing under .NET. It has been compatible with Mono (the open source, cross platform implementation of the .NET framework) for several years, but most of the documentation talks about using it from within the MonoDevelop IDE. I wanted to offer SpecFlow as one of the…

  • To TDD or not to TDD? That is not the question.

    To TDD or not to TDD? That is not the question.

    Over the past few days a TDD debate has been raging (again) in the blog-o-sphere and on Twitter. A lot of big names have been making bold statements and setting out arguments, of both the carefully constructed and the rhetorically inflammatory variety. I’m not going to revisit those arguments – go read the relevant posts,…

  • Teaching TDD (TTDD)

    Teaching TDD (TTDD)

    There has been a flurry of discussion about how to teach TDD, sparked off by a recent post from Justin Searls. In it he lists a number of failures that range from “Encouraging costly Extract refactors” to “Making a mess with mocks” all of which distract attention from the concept that “TDD’s primary benefit is…

  • TDD at interviews

    TDD at interviews

    Allan Kelly posted an article on DZone this week predicting that TDD would be a required skill for developers by 2022. Vishal Biyani asked on Twitter about how one might test TDD skills, and I promised to blog about my experience of using Cyber-Dojo in interview situations. Cyber-Dojo is a browser-based dojo environment developed by…