16
05
2008
I’ve seen a few Rake tasks for Rcov that work OK, but which fail in an interesting way (if you care about coverage): they give your coverage metrics an unexpected boost if you have 0% coverage in one or more source files.
Huh? Exactly. If you have 500 source files, and your test suite only requires one of them, then you get a free ride on those 499 files that have 0% coverage. Theoretically you could get 100% coverage in your report even though 499 source files are not touched at all. D’oh!
Read the rest of this entry »
Comments : 1 Comment »
Categories : coverage, ruby, ruby on rails, testing, tools
4
08
2007
I’ve written before about tips for offshoring. One specific thing I said to watch for is the bait-and-switch of talent: during the sales process you’re shown rockstars, but the real code you get is written by clueless newbies. When you set up a project such that you’ve minimized the cost per hour of development, but you don’t have anyone checking the work product (i.e. code reviews) coming from the subcontractor, very bad things happen.
Read the rest of this entry »
Comments : 7 Comments »
Categories : humor, java, labor, management, offshoring, outsourcing, sql, testing
2
08
2007
From what I’ve seen, Rails’ weakest features lie in the way it prepares the test database and test data, and Ruby’s Test::Unit isn’t much better than the awful but ubuiquitous JUnit that Java developers are accustomed to. I set out this week to impose my preferences on Rails in this area, and that took some effort. Here’s what I did.
Read the rest of this entry »
Comments : 5 Comments »
Categories : architecture, databases, java, postgresql, ruby, ruby on rails, sql, testing
11
07
2007
Coverage tests in Ruby (with rcov) are less strict than in Java (with EMMA), so watch out – 100% coverage is easy to attain but not as meaningful.
Read the rest of this entry »
Comments : 3 Comments »
Categories : coverage, java, ruby, testing, tools
29
06
2007
If you’re programming in Ruby, then in the list of “should be’s” is “using autotest“, assuming you’re doing automated testing, which of course is a giant “should be”. One problem if you’re using a bunch of gems or Rails is that their code works and yours is broken but the failure stacktraces you’re reading contain their method names mixed in with yours. 99% of the time this is distracting. So, using some code from Faisal that did the same thing with an older version of Autotest but doesn’t work in the latest release, I hacked up the code to help remove unwanted text from Autotest test output. And now I present it to you.
Read the rest of this entry »
Comments : No Comments »
Categories : ruby, ruby on rails, testing, tools