You are at the archive for the testing Category:

Updated .autotest

I just brought a new project into the world of autotest. I’m not using the Leopard FSEvents “fix” because it’s not necessary (note the sleep and add_exception calls below). I am using the fun and helpful sound plugin, but not the playlist version of that plugin. Here’s my .autotest file.

Making Rcov measure your whole Rails app, even if tests miss entire source files

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 […]

Bad, Bad Code

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 […]

Rails, Fixtures, the Test DB, and Test::Unit

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 […]

RCOV C0 line coverage more generous than EMMA’s C1 line coverage

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.