Am 10.07.2013 um 08:15 schrieb "Torsten Bergmann" <asta...@gmx.de>:

> Camillo wrote:
>> Does anybody here distinguish failures and errors for real when doing TDD?
> 
> Yes, it has a special meaning AND is very helpfull - ESPECIALLY when you 
> start with tests first (XPStyle):
> Usually one writes the tests and then you try to get them from red over 
> yellow to
> green:
> 
> red:    there is a real error, for instance a message is not yet implemented 
> (maybe only the test was written 
>        and one uses the debugger and the "Create" functionality to create the 
> calls)
> 
> yellow: the basic calls are there/messages implemented and working (no DNU) 
> but an expectation is not yet 
>        met since an assertion fails
> 
> green:  everything is OK
> 
> 
> Or to quote Kent Beck: http://www.xprogramming.com/testfram.htm
> 
> <quote>
> "Failures and Errors
> 
> The framework distinguishes between failures and errors. A failure is an 
> anticipated problem. When you write tests, you check for expected results. If 
> you get a different answer, that is a failure. An error is more catastrophic, 
> a error condition you didn't check for."
> </quote>
> 
That is funny. I was thinking the same when replying to Cami. I wanted to write 
something like an error being more catastrophic... but then I was thinking 
about it and I'm not sure anymore. Sure they are different...wait...are they? 
The longer I think about it the lesser I'm convinced that it needs to stay like 
it is. Especially in the case of should:raise: where a piece of broken code 
triggers only a failure. 
Just to be correct...No Cami...that doesn't mean it needs to be changed either 
:)

Norbert

> Please keep it separated, it is very usefull.
> 
>> Besides the complexity added to the testing framework it is a burden for 
>> newcomers.
> 
> Learning about Pragmas, Methods, Classes, Debugger, marking expected 
> failures, ... is also a burden for newcomers.
> Will we throw them out? No!
> 
> SUnit is still really simple and a pleasure to work with!
> 
> Thx
> Torsten
> 
> 
> 

Reply via email to