Understanding the difference between “test-first” and “test-driven?

The key aspect of test-driven development is that you do not implement functionality that is not required to pass a test. Test-first simply means writing the test before you implement the functionality. This is mostly done to ensure that the test will actually fail if the functionality is not present.

Test-driven development implies a test-first approach, but not the other way around.

I think you've understood and articulated pretty well the distinction between test-first and test-driven, and as Björn points out, all test-driven development is necessarily test-first. To your question of how to get from a test-first to a test-driven mindset, I'd suggest working a relatively simple exercise (say, implementing Range or Rectangle) several times, trying to arrive at a different implementation each time. The first time through, you'll come up with what you are thinking of right now - and that's not test-driven, as you point out.

The next time through, you can't use what you're currently thinking; you'll have to reach out to come up with something different, and some of that reaching will happen in the presence of a failing test. Maybe the third time through, you'll begin to discard your preconceived solutions, and just do what the test compels you to do - and you're on your way to a test-driven mindset.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions