Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TDD: Unit testing focus

Could TDD be oriented to another kind of testing different from unit testing?

like image 548
SDReyes Avatar asked Feb 06 '10 20:02

SDReyes


3 Answers

While that might be possible under some interpretation of TDD, I think the main point of TDD is to write the tests before any production code. Given that, you won't have a large system to write integration or functional tests for, so the testing is necessarily going to be on the unit level.

like image 90
Jakob Borg Avatar answered Nov 15 '22 16:11

Jakob Borg


Behavior-Driven Development (BDD) applies the ideas of TDD at the integration testing and functional testing level.

like image 24
Erin Dees Avatar answered Nov 15 '22 14:11

Erin Dees


The red-green-refactor cycle of TDD is supposed to be quick, really quick. Fast feedback keeps you in the groove. I've seen approaches to TDD that take a full story, express it as a test, then drive development to pass that (large-ish) test. It's nominally TDD (or maybe BDD), but it doesn't feel right to me. Tiny steps, unit tests, is how I learned TDD, how I think of it, and how it works best for me.

like image 32
Carl Manaster Avatar answered Nov 15 '22 16:11

Carl Manaster