Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That’s not really true.

“Unit tests are small tests, each one exercising a little piece of functionality. The units tested are usually individual methods, but sometimes clusters of methods or even whole objects.”

Extreme Programming Explained: Embrace Change, 2nd Edition (2004) Kent Beck



You're agreeing with me there. "each one exercising a little piece of functionality". In Beck's approach the tests are added at each step for a simple functionality addition, which then gets implemented in the project to pass the test. These days unit tests are more commonly used as "every method is a unit to be tested completely", often after the implementation is already there.


I don’t see how?

You said: “Around the xp times, unit tests were not per-method.”

Beck said: “Unit tests are usually individual methods”


That quote is saying the same thing as GP.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: