On 04/14/2011 07:09 PM, Andrei Alexandrescu wrote:
Applying "let me output something and eye it" at the level of each unit test
does not scale because it makes it extremely difficult to identify issues once
one test of many produces unexpected output. There are programs (such as
"expect") that automate that task. The ultimate goal is to make errors noisy
and easy to identify.

I do agree. But this point gets very different once:
(1) One can selectively chose which tests to run, thus having only output from one(s) relevant to the issue at hand (eg via named unittests),
(2) one can switch from silent to verbose modes.

In the case of unittests used for regression testing (*), the silent mode would initially just say "there is an error here". Then switching to verbose mode, on relevant tests only, would provide helpful data to solve the issue. But for me unittests are far to be useful only for regression tests. They are everyday development tools I constantly use: as sample code, to study what code actually does, te debud or improve a piece of code; even if I don't practice TDD at all (rarely use tests as kinf of spec).

I have talked about that already, but the message seems difficult to pass for a reason I do not grok.

Denis

(*) I mean, to check all still works fine after a change on an initially running codebase.
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to