Tag Archives: TDD

TDD Efficiency

Microsoft Research has put out a paper with data that shows imple­ment­ing TDD increases your devel­op­ment time by 15–35% but decreases your pre-release defects by 40–90%. This is in line with my expe­ri­ence and women’s intu­ition. I haven’t quite made it through the entire paper but you can read it here.

Give Me An Assertion Vasily. One Assertion Only, Please

I was work­ing through some bro­ken unit tests this morn­ing for the project I’m cur­rently on and the sec­ond one in my list looked like this: [Test­Method] pub­lic void SelectTest() { Item item = session.SelectSingle(a => a.SkuNo == _item.SkuNo); Assert.IsTrue(item.Id > 0); Assert.AreEqual(item.Id, _item.Id); Assert.AreEqual(item.IsAutoReplenished, _item.IsAutoReplenished); Assert.AreEqual(item.Status, _item.Status); Assert.AreEqual(item.MaintenanceLevel, _item.MaintenanceLevel); Assert.AreEqual(item.Description, _item.Description); Assert.AreEqual(item.Type, _item.Type); Assert.IsTrue(item.LastAdjustmentDate.HasValue); Assert.AreEqual(item.LastAdjustmentDate.Value.Date,

TDD With Python and Pylons

I’ve been doing some devel­op­ment on a web­site using Python and the Pylons web frame­work. I’m try­ing to stay pretty strict with Test Dri­ven Devel­op­ment (TDD) though I run into prob­lems because I’m still a com­plete novice with Pylons and a half-complete novice with Python. In my expe­ri­ence so far, unit tests are mod­er­ately dif­fi­cult