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
Bugfixes
- 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
- 33 http://www.artima.com/forums/flat.jsp?forum=123&thread=159040
- 17 http://anarchaia.org
- 7 http://www.artima.com/buzz/community.jsp?forum=123
- 5 http://www.anarchaia.org
- 4 http://anarchaia.org/archive/2006/05/07.html
- 3 http://anarchaia.org/archive/2006/05.html
- 3 http://rubyriver.org
- 3 http://ruby-and-rails.toptensources.com/TopTenSources/Default.aspx
- 2 http://www.google.com/custom?q=rails rcov&client=pub-6699214427597032&cof=L:http://www.petercooper.co.uk/images/rubylogo.gif;LH:50;LW:47;LP:1;BGC:#FFFFFF;T:#000000;LC:#CC0000;VLC:#663399;ALC:#CC0000;GALT:#008000;GFNT:#000000;GIMP:#000000;DIV:#CC0000;LBGC:#FFFFFF;AH:left;S:http://www.rubyinside.com/;CX:Ruby%20Search;&btnG=Search&cx=005711913906221599786:gq5z1mmqveq&hl=en
- 2 http://planetruby.0x42.net
Keyword(s):[blog] [ruby] [frontpage] [code] [coverage] [rcov] [0.3.0] [rails] [release]
References:[rcov: code coverage for Ruby]