Test driven development explained: why the test comes first

TL;DR

Difficulty: Beginner

An automated test is a small piece of code that checks one answer: arrange the situation, act, assert the result.

  • Test driven development (TDD) writes that test first, watches it fail for the right reason, writes just enough code to pass, then tidies up while everything stays green.
  • A test list, baby steps, fake it and triangulate keep the steps small and honest. Test names written as behaviour turn the test file into a specification the business can read.
  • Research: 40% to 90% fewer pre release defects in four industrial teams, a small positive effect on quality across 27 studies, and most of the benefit sits in small, steady steps.
  • When you do not know what to build yet, spike, learn and throw the spike away. When the code handles money or rules for years, write the test first.

Ask how someone knows their code works and you usually hear "I tried it". That holds on the day and says nothing about next month. Test driven development is a different answer: write the check first, watch it fail, then write the code. Here it is from zero, built turn by turn on a discount code for an online tea shop, with what it costs and what the research says.

The question behind this article

Ask a developer how they know their code works and you will usually hear "I tried it". They clicked through the shop, the discount came off, the order went through. That is a fair answer on the day. It says nothing about next month, after three more features and a library update, when nobody clicks through that exact path again.

Test driven development (TDD) is a different answer. You write a small piece of code that checks the behaviour you want, you watch it fail, and only then do you write the code that makes it pass. It sounds backwards the first time you hear it. By the end of this article it should sound like the obvious order, and you should know what it costs, what the research says about it, and when it is fine to skip it.

I will use one invented business throughout. Fernhill Tea is an online tea shop in Bristol (fernhilltea.example). It sells loose tea and tea subscriptions, takes card payments through a payment provider, offers discount codes, keeps track of stock and sends order emails. Its developer is Priya. The shop and Priya are made up, the code is real and runs.

What an automated test is

An automated test is a small piece of code that runs part of your real software and checks one answer. If the answer is the one you expected, the test passes. If not, it fails and tells you what it got instead. You can run hundreds of them in a few seconds, as often as you like, and they never get bored or skip a step.

Almost every good test has the same three parts, a pattern Bill Wake named Arrange, Act, Assert in 20011. They are:

  • Arrange: set up the situation. A basket with certain items, a customer, a date.
  • Act: do the one thing you are testing. Ask for the delivery fee, apply a code.
  • Assert: check the result against the answer you expected.

In Ruby on Rails, the framework I build with, tests live in a test folder and run with one command, bin/rails test. Rails uses a testing library called Minitest by default2.

Example: Fernhill Tea's free delivery rule as a test

Fernhill Tea delivers free on orders of £25 or more. Here is that rule as a test:

require "test_helper"

class DeliveryTest < ActiveSupport::TestCase
  test "delivery is free from 25 pounds" do
    # Arrange: a basket worth exactly 25 pounds, counted in pence
    basket_pence = 2500

    # Act: ask the shop what delivery costs
    fee = Delivery.fee_for(basket_pence)

    # Assert: free means a fee of zero
    assert_equal 0, fee
  end
end

Line by line:

  • require "test_helper" loads the test setup Rails gives every project.
  • class DeliveryTest < ActiveSupport::TestCase is a group of tests. The name tells you what they are about.
  • test "delivery is free from 25 pounds" do starts one test. The text in quotes is its name, written as a sentence about behaviour.
  • basket_pence = 2500 is the arrange step. Money is counted in whole pence, because computers store some decimals inexactly and pennies have a habit of going missing.
  • fee = Delivery.fee_for(basket_pence) is the act step: it calls the real shop code.
  • assert_equal 0, fee is the assert step. It reads as "I expect 0, and here is what I actually got". If fee is anything other than 0, the test fails and prints both numbers.

That is all a test is. A written down expectation that a machine checks for you.

Why the test comes first

Most people who have written tests at all wrote them after the code. You build the feature, then you add a few tests around it. TDD reverses that order, for three reasons.

You prove the test can fail. A test you have only ever seen pass might be checking nothing. Watching it fail first, for the reason you expect, is the only way to know it really guards the behaviour.

You decide what the behaviour is before you build it. Writing the expectation forces the questions nobody asked in the meeting. What happens at exactly £20? What if the code expired yesterday? Questions are much less expensive to answer before the code exists.

You design the code from the caller's side. The test is the first piece of code that uses your new code. If it is awkward to write, the design is awkward, and you find out while changing it costs nothing.

Martin Fowler sums up the whole practice in three steps: write a test for the next bit of functionality, write the code until the test passes, then refactor both new and old code so it is well structured3. Kent Beck, who described the method in his 2002 book Test Driven Development: By Example, is the person most people learn it from4.

Example: the test that could never fail

Suppose Priya had built Fernhill Tea's discount code first and then added this test afterwards:

test "applies the discount" do
  code = DiscountCode.new(percent: 10, minimum_pence: 2000,
                          expires_on: Date.new(2026, 12, 31))

  assert code.discount_for(subtotal_pence: 3000, on: Date.new(2026, 11, 20))
end

It passes. It looks responsible. It is worthless. A plain assert only checks that the answer is "truthy", and in Ruby every number counts as true, including 0. Only nil and false fail. So this test passes whether the discount is £3, £300 or nothing at all.

Had Priya written it first, she would have run it before the discount code existed, seen it fail, and then asked herself the right question: fail for what reason, and what exactly should pass? That question leads straight to assert_equal 300, ..., a test that pins the real number. Writing the test first is not a ritual. It is the quickest way to find out whether your test can see anything.

Red, green, refactor: the loop

TDD runs in a short loop with three colours, named after what most test tools show on screen3:

  • Red: write one small test and run it. It fails, because the behaviour does not exist yet.
  • Green: write the least code that makes it pass. Not elegant code. Just enough.
  • Refactor: now that everything passes, tidy up. Rename, remove duplication, simplify. Run the tests again after every change so they stay green.

Then you pick the next behaviour and go round again. One turn takes minutes, not hours. The loop has one decision that beginners skip and experienced developers never do: when the test goes red, does it fail for the right reason?

Tap or click to open full screen and move around

Example: Priya's first turn of the loop

Fernhill Tea wants a discount code, WELCOME10, worth 10% off the tea in the basket. Priya writes the first test in test/models/discount_code_test.rb:

require "test_helper"

class DiscountCodeTest < ActiveSupport::TestCase
  test "gives 10% off a 30 pound basket" do
    code = DiscountCode.new(percent: 10, minimum_pence: 2000,
                            expires_on: Date.new(2026, 12, 31))

    assert_equal 300, code.discount_for(subtotal_pence: 3000,
                                        on: Date.new(2026, 11, 20))
  end
end

10% of £30 is £3, which is 300 pence. She runs bin/rails test test/models/discount_code_test.rb and gets red:

Error:
DiscountCodeTest#test_gives_10%_off_a_30_pound_basket:
NameError: uninitialized constant DiscountCodeTest::DiscountCode

Red, but for the wrong reason. The test did not check the discount at all, it fell over because the class does not exist. This is the "no" branch of the decision. Priya creates the smallest possible class in app/models/discount_code.rb:

class DiscountCode
  def initialize(percent:, minimum_pence:, expires_on:)
  end

  def discount_for(subtotal_pence:, on:)
  end
end

She runs the test again:

Failure:
DiscountCodeTest#test_gives_10%_off_a_30_pound_basket:
Expected: 300
  Actual: nil

Now it fails for the right reason: it asked for 300 and got nothing. That is a test that can see. On to green, which is the next idea.

Start with a test list, then take baby steps

Before the first test, write a plain list of the behaviours you want to cover. Kent Beck calls it the test list and puts it at the start of what he describes as "canon TDD": write the list, turn exactly one item into a real test, make it pass, optionally refactor, and repeat until the list is empty5. He also warns against a common mistake: turning every item on the list into a test up front and then trying to make them pass together5. One at a time is the point.

Robert C. Martin put the same discipline into three rules6. Paraphrased, they say:

  1. You may not write production code unless it is to make a failing test pass.
  2. You may not write more of a test than is enough to fail, and not compiling counts as failing.
  3. You may not write more production code than is enough to pass the one failing test.

These rules sound strict, and they are meant to. Their effect is that you are never more than a few minutes away from code that works. If something goes wrong, you undo the last few minutes, not the last few days. People call these small moves baby steps.

Example: Priya's test list for WELCOME10

Priya sits down with the owner of Fernhill Tea for ten minutes and writes this list in a comment at the top of the test file:

# Test list for discount codes
# 1. 10% off a 30 pound basket is 3 pounds
# 2. 10% off a 45 pound basket is 4.50 pounds
# 3. below the 20 pound minimum spend there is no discount
# 4. at exactly 20 pounds the discount applies
# 5. after the expiry date there is no discount
# 6. half pennies are rounded down, never up

Item 6 came out of the conversation. The owner did not want a code ever to give away more than 10%, so half pennies go in the shop's favour. Without the list, that decision would have been made by whatever Ruby does by default, and nobody would have noticed. The list is behaviour, written down in plain words, before any design. Priya will tick off one line per turn of the loop.

Three ways to get to green: fake it, triangulate, obvious implementation

When a test is red, how much code should you write? Beck's book gives three strategies, and knowing which one to reach for is most of the craft4:

  • Fake it: return exactly the answer the test expects, a constant. It feels like cheating. It proves the test and the wiring work, and the next test will force the real logic.
  • Triangulate: add a second example with a different answer, so the fake can no longer pass. The general rule appears only when two examples demand it.
  • Obvious implementation: when you can see the right code and it is small, just write it. If you turn out to be wrong, drop back to smaller steps.

Example: items 1 to 3 of the test list

Item 1, fake it. The test wants 300, so Priya returns 300:

def discount_for(subtotal_pence:, on:)
  300
end

Green. It is obviously not finished, and that is fine: the list still has five lines on it.

Item 2, triangulate. She adds a second test:

test "gives 10% off a 45 pound basket" do
  assert_equal 450, welcome10.discount_for(subtotal_pence: 4500,
                                           on: Date.new(2026, 11, 20))
end

Red: expected 450, actual 300. The fake cannot satisfy both tests, so the real rule has to appear:

class DiscountCode
  def initialize(percent:, minimum_pence:, expires_on:)
    @percent = percent
    @minimum_pence = minimum_pence
    @expires_on = expires_on
  end

  def discount_for(subtotal_pence:, on:)
    (subtotal_pence * @percent).fdiv(100).round
  end
end

The constructor now keeps the three settings. The method multiplies the subtotal by the percentage, divides by 100 and rounds to a whole penny. Both tests pass.

The new test uses welcome10, a small helper at the bottom of the test class, so Priya stops repeating the same setup line in every test:

private

def welcome10
  DiscountCode.new(percent: 10, minimum_pence: 2000,
                   expires_on: Date.new(2026, 12, 31))
end

It builds the WELCOME10 code with its three settings: 10%, a minimum spend of 2000 pence, and an expiry date of 31 December 2026. She also points the first test at it. Adding the helper is a refactor of the test code, done while everything is green, and she runs both tests again afterwards to be sure.

Item 3, obvious implementation. The test for the minimum spend:

test "gives no discount below the 20 pound minimum spend" do
  assert_equal 0, welcome10.discount_for(subtotal_pence: 1500,
                                         on: Date.new(2026, 11, 20))
end

Red: expected 0, actual 150. The fix is one line Priya can see clearly, so she writes it straight away:

def discount_for(subtotal_pence:, on:)
  return 0 if subtotal_pence < @minimum_pence

  (subtotal_pence * @percent).fdiv(100).round
end

return 0 if ... leaves the method early with no discount when the basket is too small. Three tests, all green.

A test that passes at once still has to prove it can fail

Sometimes you write the next test and it passes straight away. That is not automatically good news. Either the code already handles the case, or the test is not checking what you think. The way to tell the two apart is to break the code on purpose for a moment and watch the test go red.

Example: the 20 pound boundary

Item 4 on the list says the discount applies at exactly £20. Priya writes:

test "applies the discount at exactly the 20 pound minimum" do
  assert_equal 200, welcome10.discount_for(subtotal_pence: 2000,
                                           on: Date.new(2026, 11, 20))
end

It passes at once, because subtotal_pence < @minimum_pence is false when the two are equal. To prove the test is awake, she changes < to <= in the code, runs the tests and sees exactly this test fail: expected 200, actual 0. She changes it back, and everything is green again.

Values like £20 are called boundary values: the exact point where behaviour changes. Bugs love them, because "under 20" and "20 or under" look almost the same in a meeting and behave differently at a till. This test now guards that line for as long as the shop exists.

Refactor only when everything is green

Refactoring means changing the structure of code without changing what it does. It is the third step of the loop, and Fowler names skipping it as the most common way people get TDD wrong3. Two rules keep it safe. Refactor only when all tests pass, so you know where you started. And never add behaviour during a refactor: if you want new behaviour, that is a new red test. Beck lists mixing refactoring into making a test pass as a mistake in its own right5.

Example: the expiry date, then a tidy up

Item 5: no discount after the expiry date.

test "gives no discount after the expiry date" do
  assert_equal 0, welcome10.discount_for(subtotal_pence: 3000,
                                         on: Date.new(2027, 1, 1))
end

Red: expected 0, actual 300. Green with one more guard line:

def discount_for(subtotal_pence:, on:)
  return 0 if subtotal_pence < @minimum_pence
  return 0 if on > @expires_on

  (subtotal_pence * @percent).fdiv(100).round
end

Now everything is green, so Priya refactors. The two guard lines are really one question, "does this code apply to this basket today?", so she gives that question a name:

def discount_for(subtotal_pence:, on:)
  return 0 unless applies_to?(subtotal_pence, on)

  (subtotal_pence * @percent).fdiv(100).round
end

private

def applies_to?(subtotal_pence, on)
  subtotal_pence >= @minimum_pence && on <= @expires_on
end

unless means "if not". private hides the helper from the rest of the shop, because nobody outside needs to call it. She runs all five tests after the change. Still green, so the behaviour is the same and the code now reads like the rule.

Name tests after behaviour, not after methods

A test name like test_discount_for tells you which method is involved and nothing about what should happen. A name like "gives no discount after the expiry date" is a sentence of the specification. When it fails a year from now, the failure message alone tells the person on duty which promise just broke. Read the names of a test file from top to bottom and you should get the rules of the feature, in plain words, without opening the code.

Example: item 6, and the finished test file

The last item is the business decision about half pennies. A basket of £24.95 at 10% gives 249.5 pence. The owner wants that rounded down to 249.

test "rounds half pennies down in the shop's favour" do
  assert_equal 249, welcome10.discount_for(subtotal_pence: 2495,
                                           on: Date.new(2026, 11, 20))
end

Red: expected 249, actual 250, because Ruby's round rounds a half up. Priya replaces the calculation with whole number division, which in Ruby always rounds down for positive numbers:

subtotal_pence * @percent / 100

Green, and all earlier tests still pass. Here is the finished class:

class DiscountCode
  def initialize(percent:, minimum_pence:, expires_on:)
    @percent = percent
    @minimum_pence = minimum_pence
    @expires_on = expires_on
  end

  def discount_for(subtotal_pence:, on:)
    return 0 unless applies_to?(subtotal_pence, on)

    subtotal_pence * @percent / 100
  end

  private

  def applies_to?(subtotal_pence, on)
    subtotal_pence >= @minimum_pence && on <= @expires_on
  end
end

And here are the six test names, read in order, exactly as the test runner lists them:

gives 10% off a 30 pound basket
gives 10% off a 45 pound basket
gives no discount below the 20 pound minimum spend
applies the discount at exactly the 20 pound minimum
gives no discount after the expiry date
rounds half pennies down in the shop's favour

That list is the discount code policy of Fernhill Tea. The owner can read it, and the machine checks every line of it in well under a second, every time anyone changes anything. Six turns of the loop, perhaps half an hour of work, and every decision from the meeting is now written down where it cannot drift.

What TDD is not

A few misunderstandings come up so often they are worth naming.

It is not chasing 100% coverage. Coverage tools report which lines of code ran during the tests. Fowler calls coverage a useful tool for finding untested parts of a codebase and of little use as a number for how good the tests are, and he warns that a coverage target invites people to game it7. TDD tends to produce high coverage as a side effect. It is not the goal.

It is not writing tests afterwards. Tests written after the code are still valuable, and adding them to an old system is often the right move. But they cannot show you the red step, and they tend to test what the code happens to do rather than what it should do.

It is not the only test you need. TDD as shown here produces small, fast tests of single rules. A shop also needs tests that click through the real checkout in a browser, which is the subject of the chapter on unit, integration and end to end tests.

It is not a ban on exploring. When you do not yet know what to build, you explore first. More on that in the section on spikes.

Example: 100% coverage with the bug back in

Imagine Priya deletes the rounding test and changes the calculation back to (subtotal_pence * @percent).fdiv(100).round. Every line of DiscountCode still runs during the five remaining tests. The coverage report still says 100%. And the shop is back to giving away half pennies on every odd basket, against the owner's explicit decision. Coverage measured which lines ran. Only the test named "rounds half pennies down in the shop's favour" measured whether the rule was kept.

What it costs, and what the evidence says

TDD is not free, and anyone who tells you it is has not tried it on a deadline. The honest picture from research is positive on quality, mixed on speed, and more nuanced than either side of the internet admits.

The study quoted most often is from Microsoft and IBM. Nachiappan Nagappan and colleagues followed four industrial teams that adopted TDD. Their pre release defect density, meaning bugs found before release per thousand lines of code, fell by between 40% and 90% compared with similar projects that did not use TDD. The teams also felt their initial development took 15% to 35% longer8. I covered that study in the Rails guide to TDD and BDD, so here is the wider view.

A meta analysis is a study that pools the results of many earlier studies. Yahya Rafique and Vojislav Mišić pooled 27 studies and found that TDD has, in general, a small positive effect on quality and little to no discernible effect on productivity. In the industrial studies, both the quality gain and the drop in productivity were larger than in the academic ones9. So the evidence points in a sensible direction: you pay a little more up front and get fewer defects, and the effect is real but not magic.

A third study is the most useful for practice. Davide Fucci and colleagues took the TDD process apart and measured which parts mattered. Quality and productivity were associated mainly with granularity and uniformity, meaning small steps taken at a steady rhythm. Whether the test came before or after the code in each cycle had no important influence in their data10. That does not make the order irrelevant: the red step is still the only proof that a test can fail. But it tells you where most of the benefit lives, in the short loop and the baby steps.

Even the people who built the method argue about its edges. In 2014 Kent Beck, Martin Fowler and David Heinemeier Hansson, the creator of Rails, held a series of public conversations titled "Is TDD dead?". Heinemeier Hansson argued that testing everything in isolation can damage a design. Fowler argued that TDD is one route to self testing code, not the only one11. Both views are worth hearing. Neither of them argued for shipping code nobody tests.

To read a figure like "40% lower defect density", it helps to write it down. Defect density is defects divided by size:

d=DSr=d0−d1d0d = \frac{D}{S} \qquad r = \frac{d_0 - d_1}{d_0}

Here dd is the defect density, DD the number of defects found, and SS the size of the code in thousands of lines. The relative reduction rr compares the density without TDD, d0d_0, with the density with TDD, d1d_1. The reduction is a percentage change, explained from scratch in Foundations: percentages.

Example: what "40% fewer defects" means in practice

These numbers are invented to show the arithmetic. Say a comparable shop project of 20,000 lines had 150 defects found before release. That is d0=150/20=7.5d_0 = 150 / 20 = 7.5 defects per thousand lines. A project of the same size built test first had 90:

d1=9020=4.5r=7.5−4.57.5=0.4d_1 = \frac{90}{20} = 4.5 \qquad r = \frac{7.5 - 4.5}{7.5} = 0.4

So d1=4.5d_1 = 4.5 defects per thousand lines, and r=0.4r = 0.4, a 40% reduction. In plain words: for every ten bugs the first project had to find and fix before launch, the second had six. Each of those four missing bugs is an evening not spent debugging, and some of them would have been found by customers instead.

When TDD pays off, and when a spike is fine

TDD pays off most where code will live for a long time, change often, and handle money, rules or data that must be right. A discount code is a perfect case. So is VAT, stock, a subscription renewal, anything on the path a customer takes to pay.

It pays off least when you do not know yet what you are building. Extreme Programming has a name for that situation: a spike. Don Wells describes a spike solution as a very simple piece of code to explore possible solutions, built to address only the problem under examination, and he adds that most spikes are not good enough to keep, so you should expect to throw it away12. The important part is the last bit. A spike answers a question, and then it goes. You rebuild the real thing test first, with what the spike taught you.

Tap or click to open full screen and move around

Example: the tea strength quiz

Fernhill Tea wants a short quiz on the homepage that recommends a tea by how strong the customer likes it. Nobody knows yet how many questions it needs or how the answers should map to teas. Priya gives herself one afternoon and builds a rough version with no tests at all, just to try it with the owner and two regular customers.

It turns out three questions are plenty and that the most useful question is about milk, which nobody had thought of. The next morning Priya deletes the spike branch. She writes a test list from what she learned ("milk and strong gives Assam", "no milk and light gives a green tea", and so on) and builds the real quiz test first. The afternoon was not wasted. It bought the knowledge needed to write a good test list. What would have been wasted is shipping the spike, with its guesses and no tests, and then building on it for two years.

What a business owner should ask for

You do not need to read Ruby to tell whether your software is built test first. You need to ask for the evidence, in plain words, and see whether it exists.

The questions that work are simple. Can I see the list of test names for the feature we just agreed? Do the tests run automatically on every change, and does a failing test stop a release? When we decided something in a meeting, like the half penny rule, where is the test that holds it? A developer who works test first answers these with links, not reassurance.

This matters even more now that AI assistants write a large share of new code. An AI will happily produce code first and tests afterwards, or adjust a test until it passes. A test list agreed with a person, and a loop where the failing test comes first, keep the human in charge of what "correct" means. The chapters on test driven development with AI and on what to do when AI changes the test instead of the code go into that in detail.

Example: three questions the owner of Fernhill Tea asks Priya

Before WELCOME10 goes live, the owner asks Priya three things.

"Show me what the discount code is supposed to do." Priya sends the six test names. The owner reads them and spots nothing missing, but asks for a seventh: a code must not work on the subscription box, which is already discounted. Priya adds it to the test list, writes the red test, makes it pass. Ten minutes.

"What happens if someone changes this later?" Priya shows that the tests run on every change and that a red test blocks the release.

"How do I know the rounding decision stuck?" Priya points at the test named "rounds half pennies down in the shop's favour". The owner now has the policy in writing, checked by a machine, and the next developer cannot quietly undo it.

For what it is worth, that is how I work too. Every project I build in Ruby on Rails and Solidus starts test first, with behaviour scenarios on top that a client can read, and every release goes through a test gate before it reaches customers. The next chapter, on behaviour driven development, shows how the conversation with the owner becomes those scenarios.

Conclusion

An automated test is a written expectation that a machine checks for you: arrange the situation, act, assert the answer. TDD writes that expectation first, watches it fail for the right reason, writes just enough code to pass, and tidies up while everything stays green. A test list keeps the steps small, fake it and triangulate keep them honest, and behaviour names turn the test file into a specification the business can read.

It costs some time up front. The research says it buys fewer defects in return, and that the small, steady steps are where most of the value lives. When you do not know what to build, spike, learn, and throw the spike away. When the code will carry money, rules or customers for years, write the test first. It is the order that lets you change your mind later without breaking your promises.

If you want the rules that run your shop written down as tests your business can read, book the free workshop: we draw up the first test list together, and the first two weeks of work are on me.

Sources

  1. 1.

    Bill Wake, 3A, Arrange, Act, Assert, XP123, 26 April 2011, https://xp123.com/3a-arrange-act-assert/

  2. 2.

    Ruby on Rails Guides, Testing Rails Applications, https://guides.rubyonrails.org/testing.html

  3. 3.

    Martin Fowler, Test Driven Development, martinfowler.com, first published 5 March 2005, updated 11 December 2023, https://martinfowler.com/bliki/TestDrivenDevelopment.html

  4. 4.

    Kent Beck, Test Driven Development: By Example, Addison Wesley, 2002, ISBN 9780321146533, https://www.informit.com/store/test-driven-development-by-example-9780321146533

  5. 5.

    Kent Beck, Canon TDD, Software Design: Tidy First?, 11 December 2023, https://newsletter.kentbeck.com/p/canon-tdd

  6. 6.

    Robert C. Martin, The Three Rules of TDD, ButUncleBob.com, 2005, http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd

  7. 7.

    Martin Fowler, Test Coverage, martinfowler.com, 17 April 2012, https://martinfowler.com/bliki/TestCoverage.html

  8. 8.

    Nachiappan Nagappan, E. Michael Maximilien, Thirumalesh Bhat and Laurie Williams, Realizing quality improvement through test driven development: results and experiences of four industrial teams, Empirical Software Engineering 13, 289 to 302, Springer, 2008, https://doi.org/10.1007/s10664-008-9062-z

  9. 9.

    Yahya Rafique and Vojislav B. Mišić, The Effects of Test Driven Development on External Quality and Productivity: A Meta Analysis, IEEE Transactions on Software Engineering 39 (6), 835 to 856, IEEE, 2013, https://doi.org/10.1109/TSE.2012.28

  10. 10.

    Davide Fucci, Hakan Erdogmus, Burak Turhan, Markku Oivo and Natalia Juristo, A Dissection of the Test Driven Development Process: Does It Really Matter to Test First or to Test Last?, IEEE Transactions on Software Engineering 43 (7), 597 to 614, IEEE, 2017, preprint at https://arxiv.org/abs/1611.05994

  11. 11.

    Martin Fowler, Kent Beck and David Heinemeier Hansson, Is TDD Dead?, recorded conversations, May and June 2014, martinfowler.com, https://martinfowler.com/articles/is-tdd-dead/

  12. 12.

    Don Wells, Create a Spike Solution, ExtremeProgramming.org, 1999, http://www.extremeprogramming.org/rules/spike.html