DEV Community

Discussion on: F**k TDD

Collapse
 
floverdevel profile image
Ellis

I'd like to clarify something.
BDD is not an evolution of TDD.
TDD and BDD are actually the same thing, and it's all about testing behaviors.

Considering Kent Beck's book «Test-Driven-Development by example», Kent says «The object of TDD is to test behaviors in the system». Behavior is the requirement, the TDD requirement.

Also, one thing that can confuse a lot of people is the definition of a unit, what is the system under test (SUT) in a unit test?

The SUT is the «exports» from a module, its facade, its public API.
The SUT is not necessarily a class and it's definitely not a method of a class.

I highly recommend watching the video "TDD, Where Did It All Go Wrong" by Ian Cooper to get more information about what TDD actually really is 🙂
youtube.com/watch?v=EZ05e7EMOLM

Collapse
 
vikkio88 profile image
Vincenzo

hello Ellis, nice to get some feedback on this, I did not mean evolution as in TDD is a subset of BDD, more like, if follow that line of thoughts you will naturally end up working with BDD.

Was more based on my personal experience.

The whole article was more about extremism, and how sometimes theory should not be applied exactly as it is described in the books, and how I found an approach that works for me.

Thanks for sharing that video will look into it, it does sound interesting

Collapse
 
floverdevel profile image
Ellis

follow that line of thoughts you will naturally end up working with BDD

I agree 👍😊