Emma Plugin extended based on version Emma Plugin Version 1.2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Emma Plugin extended based on version Emma Plugin Version 1.2

Can Özdemir
Hello,

I've extended the Emma plugin, so that the build status is set to
unstable if the linecoverage for any file is below a certain threshold
(given as percentage).
You can configure that threshold in the project settings (you can also
specify 0 (%) to disable that functionality).

Would be great, if you could merge the files with the current emma
plugin release.

Thanks in advance,
Can Özdemir

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

emma-1.2-updated-src.tar.gz (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Emma Plugin extended based on version Emma Plugin Version 1.2

Kohsuke Kawaguchi-2
Can Özdemir wrote:

> Hello,
>
> I've extended the Emma plugin, so that the build status is set to
> unstable if the linecoverage for any file is below a certain threshold
> (given as percentage).
> You can configure that threshold in the project settings (you can also
> specify 0 (%) to disable that functionality).
>
> Would be great, if you could merge the files with the current emma
> plugin release.
Cool. I'll integrate this.

I don't use emma plugin that extensively myself, but is it common to
look for "if line coverage of any file goes below threshold"?

For example, if I have an interface, isn't that reported as 0% coverage?
(IIRC, Emma has a bug to count annotation as an executable line.) Or
like if you have a class that's only used for error diagnostics in
deployment?

I thought people usually pick up larger unit, like the whole code or
package level.

... but we can improve those as we go, I guess.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Emma Plugin extended based on version Emma Plugin Version 1.2

Kohsuke Kawaguchi-2
In reply to this post by Can Özdemir
Can Özdemir wrote:

> Hello,
>
> I've extended the Emma plugin, so that the build status is set to
> unstable if the linecoverage for any file is below a certain threshold
> (given as percentage).
> You can configure that threshold in the project settings (you can also
> specify 0 (%) to disable that functionality).
>
> Would be great, if you could merge the files with the current emma
> plugin release.
Do you mind if I touch the code?

For example, I'd like to change it to the Sun coding convention that the
rest of the Hudson source code uses.

I also wonder if keeping CoverageObject.minLineCoverage is a good idea
or not. People will likely want different criteria, so we want to
abstract away the logic that marks coverages as "failed". AFAICT, just
having "isFailed" should be good enough.

Also, can I move com.frequentis.hudson package to hudson.plugins.emma
package?

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Emma Plugin extended based on version Emma Plugin Version 1.2

Can Özdemir
In reply to this post by Kohsuke Kawaguchi-2

Kohsuke Kawaguchi wrote:

> Cool. I'll integrate this.
>
> I don't use emma plugin that extensively myself, but is it common to
> look for "if line coverage of any file goes below threshold"?
>
> For example, if I have an interface, isn't that reported as 0% coverage?
> (IIRC, Emma has a bug to count annotation as an executable line.) Or
> like if you have a class that's only used for error diagnostics in
> deployment?
>
> I thought people usually pick up larger unit, like the whole code or
> package level.
>

I'm not sure about Emma handling interfaces but if you have a class which
you don't want to be included in your coverage report, you can specify that
when running emma.


----
Can Özdemir


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Emma Plugin extended based on version Emma Plugin Version 1.2

Can Özdemir
In reply to this post by Kohsuke Kawaguchi-2

Kohsuke Kawaguchi wrote:

>
> Do you mind if I touch the code?
>
> For example, I'd like to change it to the Sun coding convention that the
> rest of the Hudson source code uses.
>
> I also wonder if keeping CoverageObject.minLineCoverage is a good idea
> or not. People will likely want different criteria, so we want to
> abstract away the logic that marks coverages as "failed". AFAICT, just
> having "isFailed" should be good enough.
>
> Also, can I move com.frequentis.hudson package to hudson.plugins.emma
> package?
>


Of course you can touch the code :)
You can change its coding style, rename its package, or change the
minLineCoverage variable - no problem whatsoever :)


Kind regards,

----
Can Özdemir

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]