Files
wordpress-public-workspace/tools/testlab/README.md
T

1.8 KiB

WordPress Plugin Test Lab

Local Docker test lab for public WordPress plugins.

The lab mounts plugin source from this workspace into disposable WordPress containers, installs WordPress with WP-CLI, activates the selected plugin, and runs smoke tests.

Environments

Initial matrix:

Environment WordPress Image PHP Database
wp7-php84 wordpress:php8.4-apache 8.4 MariaDB 11
wp6-php74 wordpress:php7.4-apache with WP 6.8.2 download 7.4 MariaDB 10.6

The wp7-php84 image installs the latest WordPress available in the image line. The wp6-php74 environment uses the available PHP 7.4 WordPress image, then forces a WordPress 6.8.2 core download before install. The test script records the actual WordPress version after install.

Commands

Run all configured environments:

cd tools\testlab
.\scripts\run-all.ps1

Run one environment:

cd tools\testlab
.\scripts\run-env.ps1 -Env wp7-php84

Stop and remove one environment:

cd tools\testlab
.\scripts\down-env.ps1 -Env wp7-php84

Stop and remove all environments:

cd tools\testlab
.\scripts\down-all.ps1

What The Smoke Test Does

  • Starts WordPress and MariaDB.
  • Waits for the database and WordPress container.
  • Installs WordPress.
  • Activates bible-reference-tooltips.
  • Confirms PHP, WordPress, and plugin versions.
  • Confirms the plugin-created table exists.
  • Imports WEB, KJV, ASV, and YLT through the plugin's internal importer.
  • Confirms imported verse rows and canonical book coverage exist.
  • Confirms representative REST lookups, including compact references such as Mark10:45, Eze 36:26, and 2Jn1:6.
  • Creates a post containing those references.

This stops before WordPress.org SVN or plugin submission work.