[wp-trac] [WordPress Trac] #46373: Add code coverage tracking

WordPress Trac noreply at wordpress.org
Fri Aug 14 16:15:40 UTC 2020


#46373: Add code coverage tracking
-------------------------------------+---------------------
 Reporter:  pento                    |       Owner:  (none)
     Type:  task (blessed)           |      Status:  new
 Priority:  normal                   |   Milestone:  5.6
Component:  Build/Test Tools         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:
-------------------------------------+---------------------
Changes (by jrf):

 * milestone:  Future Release => 5.6


Comment:

 I'd highly recommend for this ticket to be revisited for WP 5.6.

 As explained in more detail in #50902, there are significant changes in
 PHP 8.0 which we will only be able to detect breakage from via unit tests.

 Knowing which code is not, or insufficiently, covered by tests will allow
 a more focused approach for expanding the test suite to ensure
 compatibility with PHP 8.0.

 Regarding CI integration: only one build running all tests is needed with
 code coverage enabled.
 The Xdebug/PHPUnit combination has received lots of work over the past
 year or so, so with PHPUnit 9.x, it is likely that using Xdebug (enabled
 only for that one build) will be the fastest option, though testing it is
 recommended.

 Xdebug will also allow for enabling the - far more accurate - path and
 branch coverage reports as introduced in PHPUnit 9.3.x, though those do
 make the code coverage reporting extremely slow, so should probably only
 be used locally. For more information, see: https://doug.codes/php-code-
 coverage

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46373#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list