Make WordPress Core

Opened 2 months ago

Last modified 38 hours ago

#64894 new task (blessed)

Test tool and unit test improvements for 7.1

Reported by: desrosj's profile desrosj Owned by:
Milestone: 7.1 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

This ticket is for various fixes and improvements in PHPUnit tests that don't have a more specific ticket, as well as general improvements to the GitHub Actions workflows that run automated testing.

Previous releases:

Change History (6)

This ticket was mentioned in PR #11381 on WordPress/wordpress-develop by @desrosj.


8 weeks ago
#1

  • Keywords has-patch has-unit-tests added

This fixes a failing tst that seems to be caused by the fact that MySQL changed the content on release pages.

Unfortunately, it does not seem like there is an official API available from MySQL itself. However, endoflife.date is an open source, MIT licensed, reasonably maintained project that does have an endpoint available.

Trac ticket: Core-64894.

## Use of AI Tools

AI Assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6
Used for: Searching for possible APIs to use to replace parsing an HTML document.

#2 @desrosj
8 weeks ago

In 62170:

Tests: Fix test that checks MySQL version recommendation.

A test in the external-http group that detects when the recommended version of MySQL is too old is failing due to an upstream change to the content of version documentation pages.

Because the required information is no longer on the page, this switches to using the public API from endoflife.date. This site is an open source (MIT licensed) resource that is actively maintained.

Props peterwilsoncc.
See #64894.

@desrosj commented on PR #11381:


8 weeks ago
#3

Merged in r62170.

This ticket was mentioned in PR #11433 on WordPress/wordpress-develop by @johnbillion.


7 weeks ago
#4

The e2e and performance tests switched from Puppeteer to Playwright. One of the things that prevents Puppeteer being removed as a dependency is the grunt-contrib-qunit test runner which uses Puppeteer.

This replaces the runner with a Playwright config.

Notes:

  • grunt-contrib-qunit reports test counts, this Playwright config reports assertion counts, hence the number of passes has changed from 456 to 535. The actual tests and assertions have not changed.
  • puppeteer-core is still a transitive dependency after this change due to wp-scripts and lighthouse. One step at a time.
  • qunit/editor hasn't existed since https://core.trac.wordpress.org/changeset/40584 nine years ago.

@johnbillion commented on PR #11433:


4 weeks ago
#5

After further thought, I think the AppArmor config in .github/workflows/reusable-javascript-tests.yml will need to be retained. Removing it will cause older branches that use Puppeteer to start failing.

#6 @SergeyBiryukov
38 hours ago

In 62370:

Tests: Correct some test class names.

Follow-up to [62313], [62352], [62366].

See #64894.

Note: See TracTickets for help on using tickets.