Using @covers could be a simple way to ensure that you do not forget to unit test parts of your classes. Even if you had integration tests that cover all code paths, you still want unit tests to cover whole classes since integration tests can change due to different circumstances. So perhaps just use @covers for unit tests.
On Thu, Aug 22, 2013 at 3:03 PM, Jeroen De Dauw <jeroendedauw@gmail.com> wrote:Hey,I'd like to reiterate over the importance of using @covers tags [0] for test cases rather then writing "Test for SomeClass". These tags make coverage reporting a lot more accurate, and thus make it easier to spot areas lacking tests.
Today I added a bunch of @covers tags in the DataModel component. The reported coverage dropped from 85% to 57%, quite a difference.Surely the test infrastructure can tell what code paths are executed without a human annotating them (and to a much finer granularity than class or method since most methods have conditional flow of control).Tom
_______________________________________________
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech