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

> You fail to adress that.

I can write the `SaveButtonTest` before writing the `SaveButton`. I can write a `VisualComparisonTest.itKitchenSinkPageScreenshotMatchesFixture()` before having the KitchenSink view. I can write an AccessibilityReportThreshold.save_game_modal_meets_a11y_reqs() before having any application code to run the report on (it will fail with an error, which is expected and good).

The fact that you condescendingly call it "TDD religion", however, tells me, I'm not going to convince of the value of tests at all, let alone the difference in value from the moment of writing the test.



When I did TDD, we'd start by writing a test. The tests wouldn't compile (Java) or link (C++) because the function being tested didn't exist yet. Then we'd write the (empty) function. The test would fail, because the function didn't exist. (It's very important that you see the test fail! You need to know that the test actually can detect if the function doesn't work.)

Then we'd implement the function, and re-run the test.


Unit and integration tests are valuable.

The religion that every line of code needs a test before it gets written not so much, specially since many designs require human testing.




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

Search: