Posts Tagged ‘Writing Reliable’
Posted by Rahoul Baruah on October 5th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: Bug-Free Code, bugs, cucumber, logging, rails, ruby, Writing Reliable •
Comments Off
We just had some customers report a bug. Not good. We didn’t get an exception email. All the tests passed. We couldn’t see anything untoward in the log files. But it was there. We could reproduce it, both in staging and in production. Not good at all.
But the weirdest thing was we couldn’t [...]
Posted by Rahoul Baruah on May 8th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: Bug-Free Code, database, rspec, transactions, Writing Reliable •
Comments Off
I have just written a load of test code that needed to verify that a particular set of classes behaved correctly when a transaction was rolled back.
However, the rest of my suite relied on transactional fixtures (which is Rails’ badly named way of saying that a transaction is started before each test and [...]
Posted by Rahoul Baruah on May 6th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: bug-fixing, Bug-Free Code, legacy code, rspec, Writing Reliable •
Comments Off
When you’ve got an application that has little or no test coverage it can be quite daunting making changes. What if you alter X and it breaks Y? Without running through the entire app by hand how will you know what you’ve broken?
Well you won’t.
Even worse, what if your [...]
Posted by Rahoul Baruah on March 24th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: acceptance tests, Bug-Free Code, cucumber, selenium, specifying, watir, webrat, Writing Reliable •
1 Comment
One of the issues when using Selenium or Watir to power your full-stack acceptance testing (apart from the time it takes for the test suite to run), is that stuff happens within your browser, fails and then Cucumber happily moves on to the next test before you get a chance to look at what went [...]
Posted by Rahoul Baruah on March 12th, 2009 under General Tags: Bug-Free Code, cucumber, demeters revenge, luke redpath, mock objects, rspec, shoulda, specifying, Writing Reliable •
2 Comments
I had the pleasure of speaking to Luke Redpath the other day.
I started off by thanking him for his Demeter’s Revenge plugin, which is one of the first things I install on a new project. He said he didn’t use it much any more, as he doesn’t do mocking, except during the design [...]