[wp-trac] [WordPress Trac] #52610: Consider removing many of the default test group exclusions

WordPress Trac noreply at wordpress.org
Mon Feb 22 19:57:46 UTC 2021


#52610: Consider removing many of the default test group exclusions
------------------------------+--------------------------------------
 Reporter:  johnbillion       |      Owner:  (none)
     Type:  task (blessed)    |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  needs-patch dev-feedback
  Focuses:  multisite         |
------------------------------+--------------------------------------
 When the tests are run with `composer test`, the following groups are
 excluded:

 * `ajax`
 * `ms-files`
 * `ms-required`
 * `external-http`

 When the tests are run with Multisite enabled with `composer test -- -c
 tests/phpunit/multisite.xml`, the following groups are excluded:

 * `ajax`
 * `ms-files`
 * `ms-excluded`
 * `external-http`
 * `oembed-headers`

 The `ms-required` and `ms-excluded` group exclusions are needed so that
 the Multisite-specific tests and single-site-specific tests don't run when
 they don't need to.

 It's less clear why the other groups in these lists are excluded by
 default.

 The `ajax` and `ms-files groups are not slow, so excluding them for
 performance reasons doesn't make sense. I think the `ajax` exclusion
 should be removed from both the single site and Multisite configuration.
 The `ms-files` exclusion should be removed too because the tests in the
 `ms-files` group don't get registered on a non-Multisite test run so the
 exclusion is redundant.

 The `external-http` tests are excluded because they are somewhat slow,
 taking around 10-15 seconds on GitHub Actions and around 40 seconds on my
 local, highly dependent on network connection speed. Let's keep these
 excluded by default.

 The `oembed-headers` group is excluded by default because it requires
 Xdebug, however this is already covered by the `@requires function
 xdebug_get_headers` tag on the only test in this group, along with being
 in the `debug` group which runs separately on GitHub Actions. The `oembed-
 headers` group exclusion can be removed as it's redundant.

 Here's my proposed new config for `phpunit.xml.dist`:

 {{{
 <exclude>
     <group>ms-required</group>
     <group>external-http</group>
 </exclude>
 }}}

 and for `multisite.xml`:

 {{{
 <exclude>
     <group>ms-excluded</group>
     <group>external-http</group>
 </exclude>
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52610>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list