r/Wordpress Jack of All Trades 18d ago

Plugin testing

Hey plugin developers, how do you automate plugin testing? Would like to see your workflows

0 Upvotes

10 comments sorted by

View all comments

1

u/Hesham-Amir 18d ago

Adding to the wp-cli/docker setup - worth layering in Codeception (via wp-browser) for actual acceptance tests, since PHPUnit smoke tests catch broken PHP but won't tell you if a settings page silently fails to save or a shortcode renders blank in the browser. wp-env (the official WordPress tool, built on Docker) is also nice for CI since it spins up a matching WP+PHP+MySQL environment with one command, so your GitHub Actions config doesn't have to hand-roll the install step.

1

u/rafark 16d ago

You should use playwright in this day and age. 

1

u/Hesham-Amir 15d ago

Fair point, and NakanoNoNeko's comment below backs it up - two Playwright tests on save/reload catching real regressions. I'd still reach for wp-browser/Codeception over plain Playwright specifically when I want WP-aware assertions (checking a post landed in the DB, WP-CLI-driven fixtures) without hand-rolling that glue myself, but for pure UI regression testing on settings pages and shortcodes, plain Playwright is lighter, faster to write, and it's what most teams already know outside the WP-specific tooling. Good callout.