[Cruisecontrolrb-users] Fail build on code coverage level?
Bryan Noll
bwnoll at gmail.com
Mon Apr 21 16:39:03 EDT 2008
Couldn't you just check in a test that runs `rcov blah ...` somewhere
and then parses through the results, checking for the percentage value
you're interested in.
If said percentage value is less than X... assert(false, "You don't have
enough tests!")
Denis Haskin wrote:
> I've got rcov_rails as part of my continuous integration build, mainly
> thanks to [1] (edited it slightly to add a dependency db:test:prepare as
> the cruisecontrol.rb doc suggests.
>
> Can someone point me in the right direction to what I should do to make
> the code coverage level a criteria for a successful build? E.g. if code
> coverage is < 80% (or maybe even <80% for a given source file) then the
> build should fail; otherwise succeed (assuming the build+test itself
> suceed).
>
> Thoughts?
>
> Thanks -- dwh
>
> [1]
> http://deadprogrammersociety.blogspot.com/2007/06/cruisecontrolrb-and-rcov-are-so-good.html
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cruisecontrolrb-users mailing list
> Cruisecontrolrb-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users
More information about the Cruisecontrolrb-users
mailing list