[ruby-core:68102] [Ruby trunk - Feature #10816] Add the ability to capture Coverage information

From: tenderlove@...
Date: 2015-02-13 01:24:44 UTC
List: ruby-core #68102
Issue #10816 has been updated by Aaron Patterson.


I made a proof of concept program (using the patch I've posted here):

  https://gist.github.com/tenderlove/fba8eaf2b2e3d84d77c5

Here is a video of it being used:

  https://www.youtube.com/watch?v=Qsn7nZEccBU

----------------------------------------
Feature #10816: Add the ability to capture Coverage information
https://bugs.ruby-lang.org/issues/10816#change-51480

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: Yusuke Endoh
----------------------------------------
Hi,

I would like to periodically capture coverage information.  The reason is because I would like to be able to pair test methods with the lines executed for that test method.  The question I would like to answer is "If I modify file A on line B, which tests should I execute?"

I've attached a patch that returns a snapshot of the current coverage information.  It means that I can grab coverage information before and after each test case, then calculate which lines of code a particular test executed.

---Files--------------------------------
snapshot.diff (3.39 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next