You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Thiago Veronezi <th...@veronezi.org> on 2014/06/02 19:03:17 UTC
Code coverage
Hi guys,
There is a new change that includes the "jacoco-maven-plugin" in all our
modules. The goal is to help us to have a good test code coverage. We will
do it by breaking the build in case it doesn't reach the minimum coverage
ratio.
Now, the build creates a "target/site/jacoco/index.html" file in each
module. This file shows the coverage ratio for that particular module. I
need hands to help me to make it ">85%" in our main modules.
How to contribute?
* Checkout the source code [http://tomee.apache.org/dev/source-code.html].
* Choose what you want to ensure test coverage.
* Create a JIRA issue stating what you are working on - Just trying to
avoid duplicated work.
* Run "mvn clean install", update the code and create unit tests as needed.
* Repeat last step until you are satisfied with the coverage you managed to
get.
* Add or update the following property in that module:
<properties>
<!-- Put the coverage shown in the target/site/jacoco/index.html file.
-->
<test.complexity.coverage.minimun>0.68</test.complexity.coverage.minimun>
<test.branch.coverage.minimun>0.4</test.branch.coverage.minimun>
</properties>
* run "mvn clean install" again to ensure that "jacoco-maven-plugin" does
not complain.
* Submit a patch.
Note that you can create a JIRA task to cover only part of a module and not
the entire thing. For Example, a nice JIRA task would be something like
this https://issues.apache.org/jira/browse/TOMEE-1231.
Sample report: http://www.eclemma.org/jacoco/trunk/coverage/
Committers, any concern about it? I know that a few of our unit tests won't
work due to obscure instrumentation issues. That's why some of the modules
aren't covered. The most important modules (container, server and tomee)
aren't affected by this problem.
[]s,
Thiago.
Re: Code coverage
Posted by dsh <da...@gmail.com>.
Sonar that we already leverage does code coverage too. The implementation
type can be configured. I.e. Sonar supports multiple code coverage tools
provider.
Cheers
Daniel
On Wed, Jun 4, 2014 at 1:06 PM, Thiago Veronezi <th...@veronezi.org> wrote:
> Hi guys,
>
> Good idea... tkx! I will do that.
>
> []s,
> Thiago
> On Jun 4, 2014 4:51 AM, "Andy Gumbrecht" <ag...@tomitribe.com> wrote:
>
> > +1 for the https://issues.apache.org/jira/browse/OPENEJB-453 approach.
> > Just needs to be well promoted and documented on the site.
> >
> > Andy.
> >
> > On 03/06/2014 21:17, Ivan St. Ivanov wrote:
> >
> >> Hey Thiago,
> >>
> >> That's a great idea for new contributors to get used to the code base!
> >> Thanks!
> >>
> >> Wouldn't it be better if you create an umbrella JIRA task and developers
> >> create subtask there? Something like with the validators issue:
> >> https://issues.apache.org/jira/browse/OPENEJB-453. Thus we can be sure
> >> that
> >> only one person is working on a module. WDYT?
> >>
> >> Cheers,
> >> Ivan
> >>
> >>
> >> On Mon, Jun 2, 2014 at 8:03 PM, Thiago Veronezi <th...@veronezi.org>
> >> wrote:
> >>
> >> Hi guys,
> >>>
> >>> There is a new change that includes the "jacoco-maven-plugin" in all
> our
> >>> modules. The goal is to help us to have a good test code coverage. We
> >>> will
> >>> do it by breaking the build in case it doesn't reach the minimum
> coverage
> >>> ratio.
> >>>
> >>> Now, the build creates a "target/site/jacoco/index.html" file in each
> >>> module. This file shows the coverage ratio for that particular module.
> I
> >>> need hands to help me to make it ">85%" in our main modules.
> >>>
> >>> How to contribute?
> >>>
> >>> * Checkout the source code [
> http://tomee.apache.org/dev/source-code.html
> >>> ].
> >>> * Choose what you want to ensure test coverage.
> >>> * Create a JIRA issue stating what you are working on - Just trying to
> >>> avoid duplicated work.
> >>> * Run "mvn clean install", update the code and create unit tests as
> >>> needed.
> >>> * Repeat last step until you are satisfied with the coverage you
> managed
> >>> to
> >>> get.
> >>> * Add or update the following property in that module:
> >>>
> >>> <properties>
> >>> <!-- Put the coverage shown in the target/site/jacoco/index.html
> >>> file.
> >>> -->
> >>>
> >>> <test.complexity.coverage.minimun>0.68</test.complexity.
> >>> coverage.minimun>
> >>> <test.branch.coverage.minimun>0.4</test.branch.coverage.minimun>
> >>> </properties>
> >>>
> >>> * run "mvn clean install" again to ensure that "jacoco-maven-plugin"
> does
> >>> not complain.
> >>> * Submit a patch.
> >>>
> >>> Note that you can create a JIRA task to cover only part of a module and
> >>> not
> >>> the entire thing. For Example, a nice JIRA task would be something like
> >>> this https://issues.apache.org/jira/browse/TOMEE-1231.
> >>>
> >>> Sample report: http://www.eclemma.org/jacoco/trunk/coverage/
> >>>
> >>> Committers, any concern about it? I know that a few of our unit tests
> >>> won't
> >>> work due to obscure instrumentation issues. That's why some of the
> >>> modules
> >>> aren't covered. The most important modules (container, server and
> tomee)
> >>> aren't affected by this problem.
> >>>
> >>> []s,
> >>> Thiago.
> >>>
> >>>
> > --
> > Andy Gumbrecht
> >
> > http://www.tomitribe.com
> > agumbrecht@tomitribe.com
> > https://twitter.com/AndyGeeDe
> >
> > TomEE treibt Tomitribe! | http://tomee.apache.org
> >
> >
>
Re: Code coverage
Posted by Thiago Veronezi <th...@veronezi.org>.
Hi guys,
Good idea... tkx! I will do that.
[]s,
Thiago
On Jun 4, 2014 4:51 AM, "Andy Gumbrecht" <ag...@tomitribe.com> wrote:
> +1 for the https://issues.apache.org/jira/browse/OPENEJB-453 approach.
> Just needs to be well promoted and documented on the site.
>
> Andy.
>
> On 03/06/2014 21:17, Ivan St. Ivanov wrote:
>
>> Hey Thiago,
>>
>> That's a great idea for new contributors to get used to the code base!
>> Thanks!
>>
>> Wouldn't it be better if you create an umbrella JIRA task and developers
>> create subtask there? Something like with the validators issue:
>> https://issues.apache.org/jira/browse/OPENEJB-453. Thus we can be sure
>> that
>> only one person is working on a module. WDYT?
>>
>> Cheers,
>> Ivan
>>
>>
>> On Mon, Jun 2, 2014 at 8:03 PM, Thiago Veronezi <th...@veronezi.org>
>> wrote:
>>
>> Hi guys,
>>>
>>> There is a new change that includes the "jacoco-maven-plugin" in all our
>>> modules. The goal is to help us to have a good test code coverage. We
>>> will
>>> do it by breaking the build in case it doesn't reach the minimum coverage
>>> ratio.
>>>
>>> Now, the build creates a "target/site/jacoco/index.html" file in each
>>> module. This file shows the coverage ratio for that particular module. I
>>> need hands to help me to make it ">85%" in our main modules.
>>>
>>> How to contribute?
>>>
>>> * Checkout the source code [http://tomee.apache.org/dev/source-code.html
>>> ].
>>> * Choose what you want to ensure test coverage.
>>> * Create a JIRA issue stating what you are working on - Just trying to
>>> avoid duplicated work.
>>> * Run "mvn clean install", update the code and create unit tests as
>>> needed.
>>> * Repeat last step until you are satisfied with the coverage you managed
>>> to
>>> get.
>>> * Add or update the following property in that module:
>>>
>>> <properties>
>>> <!-- Put the coverage shown in the target/site/jacoco/index.html
>>> file.
>>> -->
>>>
>>> <test.complexity.coverage.minimun>0.68</test.complexity.
>>> coverage.minimun>
>>> <test.branch.coverage.minimun>0.4</test.branch.coverage.minimun>
>>> </properties>
>>>
>>> * run "mvn clean install" again to ensure that "jacoco-maven-plugin" does
>>> not complain.
>>> * Submit a patch.
>>>
>>> Note that you can create a JIRA task to cover only part of a module and
>>> not
>>> the entire thing. For Example, a nice JIRA task would be something like
>>> this https://issues.apache.org/jira/browse/TOMEE-1231.
>>>
>>> Sample report: http://www.eclemma.org/jacoco/trunk/coverage/
>>>
>>> Committers, any concern about it? I know that a few of our unit tests
>>> won't
>>> work due to obscure instrumentation issues. That's why some of the
>>> modules
>>> aren't covered. The most important modules (container, server and tomee)
>>> aren't affected by this problem.
>>>
>>> []s,
>>> Thiago.
>>>
>>>
> --
> Andy Gumbrecht
>
> http://www.tomitribe.com
> agumbrecht@tomitribe.com
> https://twitter.com/AndyGeeDe
>
> TomEE treibt Tomitribe! | http://tomee.apache.org
>
>
Re: Code coverage
Posted by Andy Gumbrecht <ag...@tomitribe.com>.
+1 for the https://issues.apache.org/jira/browse/OPENEJB-453 approach.
Just needs to be well promoted and documented on the site.
Andy.
On 03/06/2014 21:17, Ivan St. Ivanov wrote:
> Hey Thiago,
>
> That's a great idea for new contributors to get used to the code base!
> Thanks!
>
> Wouldn't it be better if you create an umbrella JIRA task and developers
> create subtask there? Something like with the validators issue:
> https://issues.apache.org/jira/browse/OPENEJB-453. Thus we can be sure that
> only one person is working on a module. WDYT?
>
> Cheers,
> Ivan
>
>
> On Mon, Jun 2, 2014 at 8:03 PM, Thiago Veronezi <th...@veronezi.org> wrote:
>
>> Hi guys,
>>
>> There is a new change that includes the "jacoco-maven-plugin" in all our
>> modules. The goal is to help us to have a good test code coverage. We will
>> do it by breaking the build in case it doesn't reach the minimum coverage
>> ratio.
>>
>> Now, the build creates a "target/site/jacoco/index.html" file in each
>> module. This file shows the coverage ratio for that particular module. I
>> need hands to help me to make it ">85%" in our main modules.
>>
>> How to contribute?
>>
>> * Checkout the source code [http://tomee.apache.org/dev/source-code.html].
>> * Choose what you want to ensure test coverage.
>> * Create a JIRA issue stating what you are working on - Just trying to
>> avoid duplicated work.
>> * Run "mvn clean install", update the code and create unit tests as needed.
>> * Repeat last step until you are satisfied with the coverage you managed to
>> get.
>> * Add or update the following property in that module:
>>
>> <properties>
>> <!-- Put the coverage shown in the target/site/jacoco/index.html file.
>> -->
>>
>> <test.complexity.coverage.minimun>0.68</test.complexity.coverage.minimun>
>> <test.branch.coverage.minimun>0.4</test.branch.coverage.minimun>
>> </properties>
>>
>> * run "mvn clean install" again to ensure that "jacoco-maven-plugin" does
>> not complain.
>> * Submit a patch.
>>
>> Note that you can create a JIRA task to cover only part of a module and not
>> the entire thing. For Example, a nice JIRA task would be something like
>> this https://issues.apache.org/jira/browse/TOMEE-1231.
>>
>> Sample report: http://www.eclemma.org/jacoco/trunk/coverage/
>>
>> Committers, any concern about it? I know that a few of our unit tests won't
>> work due to obscure instrumentation issues. That's why some of the modules
>> aren't covered. The most important modules (container, server and tomee)
>> aren't affected by this problem.
>>
>> []s,
>> Thiago.
>>
--
Andy Gumbrecht
http://www.tomitribe.com
agumbrecht@tomitribe.com
https://twitter.com/AndyGeeDe
TomEE treibt Tomitribe! | http://tomee.apache.org
Re: Code coverage
Posted by "Ivan St. Ivanov" <iv...@gmail.com>.
Hey Thiago,
That's a great idea for new contributors to get used to the code base!
Thanks!
Wouldn't it be better if you create an umbrella JIRA task and developers
create subtask there? Something like with the validators issue:
https://issues.apache.org/jira/browse/OPENEJB-453. Thus we can be sure that
only one person is working on a module. WDYT?
Cheers,
Ivan
On Mon, Jun 2, 2014 at 8:03 PM, Thiago Veronezi <th...@veronezi.org> wrote:
> Hi guys,
>
> There is a new change that includes the "jacoco-maven-plugin" in all our
> modules. The goal is to help us to have a good test code coverage. We will
> do it by breaking the build in case it doesn't reach the minimum coverage
> ratio.
>
> Now, the build creates a "target/site/jacoco/index.html" file in each
> module. This file shows the coverage ratio for that particular module. I
> need hands to help me to make it ">85%" in our main modules.
>
> How to contribute?
>
> * Checkout the source code [http://tomee.apache.org/dev/source-code.html].
> * Choose what you want to ensure test coverage.
> * Create a JIRA issue stating what you are working on - Just trying to
> avoid duplicated work.
> * Run "mvn clean install", update the code and create unit tests as needed.
> * Repeat last step until you are satisfied with the coverage you managed to
> get.
> * Add or update the following property in that module:
>
> <properties>
> <!-- Put the coverage shown in the target/site/jacoco/index.html file.
> -->
>
> <test.complexity.coverage.minimun>0.68</test.complexity.coverage.minimun>
> <test.branch.coverage.minimun>0.4</test.branch.coverage.minimun>
> </properties>
>
> * run "mvn clean install" again to ensure that "jacoco-maven-plugin" does
> not complain.
> * Submit a patch.
>
> Note that you can create a JIRA task to cover only part of a module and not
> the entire thing. For Example, a nice JIRA task would be something like
> this https://issues.apache.org/jira/browse/TOMEE-1231.
>
> Sample report: http://www.eclemma.org/jacoco/trunk/coverage/
>
> Committers, any concern about it? I know that a few of our unit tests won't
> work due to obscure instrumentation issues. That's why some of the modules
> aren't covered. The most important modules (container, server and tomee)
> aren't affected by this problem.
>
> []s,
> Thiago.
>