PDA

View Full Version : Articolo su Unit Testing su MSDN Magazine


fek
14-12-2005, 11:21
http://msdn.microsoft.com/msdnmag/issues/06/01/UnitTesting/default.aspx

"How do you know if you have good coverage for your new code? Try removing a line or a constraint check. If all tests still pass, you don't have enough code coverage and you probably need to add another unit test. The best way to make sure you are adding the correct test is to not uncomment that line or check until you produce a test that fails until you do uncomment it. This may be hard, but if you can't think of a way to make this code fail, you probably don't have a good reason for writing that line of code in the first place."


Al di la' del linguaggio e del testing framework usati, i principi sono validissimi e generali.

71104
14-12-2005, 12:28
interessantissimo! io ogni tanto mi riprometto di iniziare a leggermi tutti i numeri più interessanti di MSDN Magazine, però non lo faccio mai... :cry:
un giorno lo devo fare assolutamente!

*e continua a ripromettersi* ^^

fek
14-12-2005, 13:51
I test non servono a nulla!

Sai che mi piace prenderti in giro su questo :p

DanieleC88
14-12-2005, 14:05
Sai che mi piace prenderti in giro su questo :p
Cattivo. :D

cover
14-12-2005, 19:50
Segnato da leggere anche questo...come altri 24 libri, sempre in continuo aumento...inoltre è tutto in inglese (ma alla fine, fa solo bene...^^), non mi passa più :mbe: :doh: