eigenclass logo
MAIN  Index  Search  Changes  PageRank  Login

rcov 0.3.0: happier Rails (code coverage analysis)

Driven by user feedback, rcov 0.3.0 introduces a number of features that simplify the analysis of Rails applications. Moreover, this is the first time a rcovrt binary for win32 (which makes rcov >100 times faster) is released simultaneously.

The new code coverage analysis mode, --test-unit-only, records exclusively code executed inside Test::Unit::TestCase(s). This allows you to see how much of your code was directly unit-tested, and how much was executed indirectly (e.g. run in the initialization phase or executed by the framework outside the tests). Also, this makes rcov 10-20% faster when analyzing a Rails application like Typo (on my old box, rcov runs its unit tests in 13.5s in normal mode compared to ~11s with --test-unit-only). Not quite as spectacular as the >10000% speed increase from 0.1.0 to 0.2.0 though.

Another important addition is the ability to detect aliased source files: this was very needed to analyze Rails apps, where a file could get loaded under several different names, due to the extensive usage of #require with relative paths.

Download from: rcov: code coverage for Ruby

If you're under win32 and cannot build extensions, you can also get the pre-built rcovrt.so binary. This extension was cross-compiled using mingw; here's more information about how to cross-compile for win32.

User visible changes

New features

  • --exclude-only
  • consolidate multiple references to the same underlying .rb file (much needed for Rails)
  • --test-unit-only


  • consider and/op operators
  • honor --no-color in (rich) text mode
  • output valid XHTML indices
  • many minor bugs squashed

Special thanks

  • Tom Dolbilin:
    • identified and fixed backslash problem on win32 for generated filenames
  • Andrew Kreiling:
    • made the index XHTML compliant
    • consolidate multiple references to the same underlying .rb file
  • Robert Feldt:
    • pointed me to dynamic uses of the tracing hooks, provided the inspiration for RCOV__.run_hooked

Last modified:2006/05/05 03:08:45
Keyword(s):[blog] [ruby] [frontpage] [code] [coverage] [rcov] [0.3.0] [rails] [release]
References:[rcov: code coverage for Ruby]