6

Is there a tool similar to emma, that reports which test covers a specific implementation ?

Bastl
  • 2,926
  • 5
  • 27
  • 48
  • I would use a debugger to break point the line of code and run your tests to see which test is running then it hits that line of code. – Peter Lawrey Oct 01 '12 at 13:08
  • 1.500.000 LOC, 50-70% aggregated test-coverage (itest+unittest). currently trying to increase / understand test-coverage of one module with 30.000 LOC. I need some good report, not individual manual tries ... – Bastl Oct 02 '12 at 08:20
  • Can you run groups of tests at a time and examine the report for that group? – Peter Lawrey Oct 02 '12 at 08:23

2 Answers2

6

In case you want to see, which tests cover which line of code, you may use Clover that shows you:

  • how many times one line got covered
  • which tests covered line in question

To see what one can expect from Clover, here is a screenshot: Clover coverage report. Opened info about test that hit line #49

Lauri
  • 1,859
  • 2
  • 14
  • 17
0

If you don't want to bother paying / setting up Cover, a much simpler way is:

  • remove / disable all breakpoints
  • put a breakpoint on the line that you which to know the tests covering it
  • re-run the tests in debug mode
  • look at the stacktrace to find the test calling it

This methods also allows you to see how many times a line is covered and all the tests calling it.

qwertzguy
  • 15,699
  • 9
  • 63
  • 66