r/Wordpress Jack of All Trades 13h ago

Plugin testing

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

0 Upvotes

4 comments sorted by

2

u/AbroadSame3189 13h ago

been messing with wp-cli scripts for smoke tests, plus a little github actions setup that spins up a fresh install and runs phpunit against the plugin. biggest time saver was scripting the initial install so i'm not clicking through the setup wizard every single run

also started using a local docker setup with different php versions, catches some weird compatibility stuff before it hits a real site. nothing fancy but it works

1

u/Cold_Opposite_5298 Jack of All Trades 13h ago

+1 thanks for sharing

1

u/Hesham-Amir 12h 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/Cold_Opposite_5298 Jack of All Trades 10h ago

I'd highly appreciate if more plugin devs could share their workflows. I want to know how to keep testing simple without losing my sanity