I'm using the CLOVER eclipse plugin. I have set of JUnit tests to test
my client side APIs. When I get the coverage report I see that
interface classes are not in it. I assume that since the interfaces
dont have any executable body, CLOVER removes from its report.
Please let me know with CLOVER, how can I get the coverage of methods
which are in the interfaces as all of my client side services are
provided as interfaces.
Also if CLOVER does not support this is there any other tool which
supports my requerement?
Thanks.
-Vipul
> I'm using the CLOVER eclipse plugin. I have set of JUnit tests to test
> my client side APIs. When I get the coverage report I see that
[quoted text clipped - 4 lines]
> which are in the interfaces as all of my client side services are
> provided as interfaces.
That doesn't make sense. As you've noticed, interfaces contain
declarations, not implementations (bodies) of methods. A declaration is
never called, it's the actual implementation that is executed, so can
be measured. There is no definition of method declaration coverage.
You write unit tests for implementations (actual code) - classes rather
than interfaces.
vipulk@gmail.com - 27 Apr 2006 15:58 GMT
Thanks for the reply.
Quite true. But the problem is I (and other members in my team) are
working in a project which has a framework defined by our customer and
we are not in a position to change it. Customer's requirement is to
test and see the coverage of client side methods which are provided by
interfaces.
As a trial I created the CLOVER report and manually made a summary for
the coverage of methods (in interfaces) by going through the report
analysing coverage of the implementation classes and creoss checking
them with respective interfaces. As it is a time consuming task, I want
a method to get the required coverage information which we can do more
frequentry.
Hope you can understand my situation. :)
a_szczeblewski@poczta.onet.pl - 09 May 2006 16:08 GMT
> Thanks for the reply.
>
[quoted text clipped - 12 lines]
>
> Hope you can understand my situation. :)
Sure, customer is always right ;)
The requirement is somehow strange. Coverage is measured for unit test,
and unit tests are (should be) run on actual implementations, but there
is no point for you in writing unit tests for your customer's code
(unless they outsource - and pay - you to do that).
What they really want is a coverage report for integration testing, and
I haven't seen a tool for that.
Maybe you could mock their implementation classes and show coverage of
those? Results would be the same...