Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-27 Thread Daniel Kinzler
Thank you Brad, the missing @covers line is indeed what threw me off. Also, as Trey noted, it's easy to miss negative cases. Testing every guard statement is certainly good, but does not feel as natural or as critical as testing the "happy path"... -- daniel Am 26.04.2018 um 23:13 schrieb Brad J

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Brad Jorsch (Anomie)
On Thu, Apr 26, 2018 at 3:55 PM, Kunal Mehta wrote: > | includes/Storage/RevisionSlots.php| 58.33 | 49.35 | > Most of the issue there is that hasSameContent() is not being recorded as "covered" at all because you forgot the @covers annotation on testHasSameContent(). I also see an add

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Trey Jones
If you haven't checked out https://doc.wikimedia.org/cover/, you should! You can see what code is covered (and by which tests) and what code is not covered if you want to generally improve test coverage. Two things: 1) A coverage report like that, instead of just numbers showing the relative chan

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Kunal Mehta
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, On 04/26/2018 12:02 PM, Daniel Kinzler wrote: > Hi all! > > While I think it's great that CI is making sure that test coverage > improves, I'm struggeling with making this work for me. It seems > to me the stats that are used to detect test c

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Isarra Yos
On 26/04/18 19:02, Daniel Kinzler wrote: Also, am I correct in thinking that I could introduce a completely new 1000 line class with no tests, and that would *not* be detected as decreasing coverage, since the new class didn't have any coverage before? Given that I've done similar (not a ne

[Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Daniel Kinzler
Hi all! While I think it's great that CI is making sure that test coverage improves, I'm struggeling with making this work for me. It seems to me the stats that are used to detect test coverage are faulty, or at least unintuitive. See for instance . Ple