[wp-trac] [WordPress Trac] #53911: Test modernization backwards-compatibility backports to help security test backports and extenders with WordPress cross-version testing (was: Test modernization backwards-compatibility backports to help extenders with WordPress cross-version testing)

WordPress Trac noreply at wordpress.org
Fri Aug 20 11:50:10 UTC 2021


#53911: Test modernization backwards-compatibility backports to help security test
backports and extenders with WordPress cross-version testing
-----------------------------------+--------------------------
 Reporter:  hellofromTonya         |       Owner:  johnbillion
     Type:  task (blessed)         |      Status:  assigned
 Priority:  normal                 |   Milestone:  5.9
Component:  Build/Test Tools       |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+--------------------------

Old description:

> Related to: #46149, #47381, #53904
>
> This ticket seeks to help with WordPress cross-version testing for
> extenders who are using WordPress' test cases.
>
> The scope of work was discussed during a live working session with @jrf,
> @johnbillion, @sergeybiryukov, and me. Listen or watch this live session
> [https://youtu.be/SAtiKaUwLU4?t=9389 here] and
> [https://www.youtube.com/watch?v=SAtiKaUwLU4&t=13339s here].
>
> Scope includes:
>
> - Determine how far back to backport
> - Determine what test modernization changes to backport
> - Add wrappers for the new snake_case fixture methods
>
> === Determine how far back to backport
>
> The PHPUnit Polyfills includes traits and namespaces and supports a
> minimum of PHP 5.4. WordPress had a minimum PHP 5.2 support until
> WordPress 5.2, which increased it to PHP 5.6.
>
> As part of the discovery process, this ticket will also include a list of
> popular plugins and their minimum supported version.
>
> === Add wrappers for new snake case fixture methods
>
> 5.9-alpha and newer use snake_case fixture methods (see changeset [51568]
> for more information). Extender's tests using the native PHPUnit fixture
> test methods will need to be changed to the new snake_case fixture
> methods.
>
> What about WordPress cross-version testing? In <= WordPress 5.8, the
> snake_case fixture methods did not exist.
>
> This ticket seeks to add wrappers for WordPress versions before 5.9 to
> help extenders with their testing suites.

New description:

 Related to: #46149, #47381, #53904

 Goals:
 - Allow tests which need to be backported for the security test suite to
 be backported to older WP versions without the need to make significant
 changes to these tests to get them to run.
 - Make it easier for extenders who are using core's test case(s) to be
 able to have one test suite and still be able to run it against multiple
 WP versions, including WP 5.9.
 - Not make significant changes to the test suites for older WP versions
 including not making older WP versions run PHPUnit 8+.

 The scope of work was discussed during a live working session with @jrf,
 @johnbillion, @sergeybiryukov, and me. Listen or watch this live session
 [https://youtu.be/SAtiKaUwLU4?t=9389 here] and
 [https://www.youtube.com/watch?v=SAtiKaUwLU4&t=13339s here].

 Scope includes:

 - Determine how far back to backport
 - Determine what test modernization changes to backport
 - Add wrappers for the new snake_case fixture methods

 === Determine how far back to backport

 The PHPUnit Polyfills includes traits and namespaces and supports a
 minimum of PHP 5.4. WordPress had a minimum PHP 5.2 support until
 WordPress 5.2, which increased it to PHP 5.6.

 As part of the discovery process, this ticket will also include a list of
 popular plugins and their minimum supported version.

 === Add wrappers for new snake case fixture methods

 5.9-alpha and newer use snake_case fixture methods (see changeset [51568]
 for more information). Extender's tests using the native PHPUnit fixture
 test methods will need to be changed to the new snake_case fixture
 methods.

 What about WordPress cross-version testing? In <= WordPress 5.8, the
 snake_case fixture methods did not exist.

 This ticket seeks to add wrappers for WordPress versions before 5.9 to
 help extenders with their testing suites.

--

Comment (by hellofromTonya):

 Updated to include ticket goals including making it easier to backport
 tests for security backports.

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


More information about the wp-trac mailing list