TDD with your MVP

 •  Filed under TDD, Lean, Products, Posts

Should you TDD your MVP?

This question came up on the Hacker News website a few days ago. Reading through the comments there was a very mixed response as what people preferred to do.

First let me describe a couple of things for readers of a non-programming persuasion. TDD (or test-driven development as its more commonly known) is a way of writing code. Essentially it boils down to writing a test for the code that we are about to write. This test fails until we implement the correct code to make it pass. The MVP mentioned here is a minimum viable product. This is the simplest implementation of a product that will deliver value.Got the acronyms sorted? Okay, let's crack on.

I have built a couple of MVP's with test-driven development. I have to say that using TDD to drive the product worked well for me. It gave me the confidence to ship the product once I knew it working. And that really for me is what an MVP is all about. Shipping the simplest thing that can work. We know it is working as we have the tests to prove it and from working code we can then be confident in shipping a product that provides value.

An MVP without tests is simply a throwaway application in my eyes. It's code that serves a short term purpose such as learning something new or proving a simple technique.Others might argue that this is exactly the point of a lean startup. To test an idea. However in order to test that idea for a product we need to have something that the product can offer the customer, and that needs to be value that the customer can see. Value that you can certify is working correctly.

Each to their own really, but I'll keep TDD'ing my MVPs in the meantime.