Tag: unit testing

  • 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…

  • Entanglement (or there’s nothing new under the sun)

    Entanglement (or there’s nothing new under the sun)

    I’ve just read The Age of Entanglement : When Quantum Physics was Reborn by Louisa Gilder. It’s a tremendous book, looking at the interplay between great physicists over the whole of the 20th century. If you want to learn about quantum physics itself, this is probably not the book for you, but if a mix…

  • Half a glass

    Half a glass

    Is this glass half empty or half full? There’s normally more than one way to interpret a situation, but we often forget that the situation itself may be under our control. I often find my clients have backed themselves into a corner by accepting an overly restrictive understanding of what they’re trying to achieve. They will tell…

  • 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…

  • 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,…

  • 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…

  • When is a tester not a tester?

    When is a tester not a tester?

    No, I’m not trawling through my xmas cracker jokes. I was looking through the programme for DevWeek 2014 and both my sessions are tagged as “Test”. This is following a pattern started at ScanDev last year and followed by several other conferences at home and abroad. Why am I bothered? It’s not that I mind…

  • The Beer Belly testing anti-pattern

    The Beer Belly testing anti-pattern

    The ‘Testing Pyramid’ is often trotted out to illustrate a suggested distribution of tests. More small “unit” tests; less deep “end-to-end” tests. And various people have observed common anti-patterns, specifically the Ice Cream Cone, where there are lots of end-2-end tests and hardly any unit tests.   The anti-pattern that I see most often is…