On Tue, Feb 17, 2015 at 4:28 PM, vincent(a)massol.net <vincent(a)massol.net> wrote:
On 17 Feb 2015 at 15:18:55, Marius Dumitru Florea
(mariusdumitru.florea@xwiki.com(mailto:mariusdumitru.florea@xwiki.com)) wrote:
On Tue, Feb 17, 2015 at 4:10 PM,
vincent(a)massol.net wrote:
On 16 Feb 2015 at 10:14:08, GitHub (noreply@github.com(mailto:noreply@github.com))
wrote:
Branch: refs/heads/stable-6.4.x
Home:
https://github.com/xwiki/xwiki-platform
Commit: 645089e5e573d23868077c96c2edce4d4f2daaa7
https://github.com/xwiki/xwiki-platform/commit/645089e5e573d23868077c96c2ed…
Author: Marius Dumitru Florea
Date: 2015-02-16 (Mon, 16 Feb 2015)
Changed paths:
M xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/pom.xml
Log Message:
-----------
XWIKI-11794: 13 smartclient JS files not found when editing a dashboard inline
* Reduce a bit the expected test coverage ratio to fix the quality build. I find it silly
that removing a few lines of code from a method that has unit tests can lower the ratio
(there are less instructions tested but there are less instructions in total also).
Not sure what you find silly because if some code
is more tested than the rest of the code in the same module and if you remove that code
(and thus the tests too), then it’s obvious that you will reduce the TPC (it’s a
percentage).
I didn't remove the test! So you have a method that has a unit test
that covers one execution path. You remove one line of code from that
execution path (of that method) and you also remove the line of code
from the unit test that asserts/verifies it. And you get a lower TPC.
I find this silly.
This is what you removed:
https://github.com/xwiki/xwiki-platform/commit/765668d74203e2966798c1dc2b78…
It’s more than 1 line of code (it’s 10 lines of code) ;) (but it doesn’t matter whether
it’s 1 line or 10 for the reasoning, see below)
That code was tested and thus was increasing the global TPC for that module.
You remove those lines, the tests will ten exercise a smaller % of the code so you get a
smaller TPC value.
To be more clear, what I find silly is that we are "forced" to write
unit tests (for a different part of the code) when we remove a line of
code from a method that is unit tested.
Thanks
-Vincent
Maybe you
have a wrong perception of what the TPC is?
You seem to be wanting some fixed value (and not a percentage) but that doesn’t exist :)
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs