Every other course in this track is about building something that works right now.
This one is about making sure it keeps working after the next pull request. You’ve
registered abilities, built an MCP server, and maybe already debugged one when it
stopped behaving, that’s
Debug & Troubleshoot the MCP Adapter, and
debugging is inherently reactive: something already broke, and you’re finding out why.
This course is the preventive half of that same relationship. A real testing, eval,
and CI/CD setup that catches a broken permission_callback or a regressed
execute_callback before it merges, so an agent never sees the failure at all.
The premise here is narrower and more mechanical than it first sounds. An ability is
plain PHP, permission_callback and execute_callback are ordinary functions, and
testing them is ordinary PHPUnit, nothing about the Abilities API changes that. What
does change things is the one pattern this whole track keeps returning to: an
execute_callback that itself calls out to an LLM through the PHP AI Client SDK. That
single design decision introduces non-deterministic output that a normal
assertSame() can’t grade, and an external dependency you don’t want a fast unit test
suite calling for real. This course treats those as two separate, solvable problems: a
dependency-injection pattern for the orchestration logic around the AI call, so it
stays exactly-testable, and a separate evals suite for grading the actual generated
output against a rubric instead of an exact string.
By the end you’ll have a working PHPUnit setup built on the standard
wp-phpunit/wp-phpunit Composer package, unit tests for registration, permission, and
execution running in isolation, an ability redesigned so its AI-calling logic is
swappable in tests without needing a mock that doesn’t exist in any SDK, an eval suite
scoring structured AI output against real criteria, contract tests built on the MCP
Adapter’s own real test doubles, and a GitHub Actions workflow that runs all of it
against a real MySQL service container and blocks a merge on a red test.
This course assumes you’ve already built a real MCP server, if you haven’t,
Build a WordPress MCP Server From Scratch
covers registering abilities and standing one up. It also goes considerably further
than the brief CI/CD lesson inside
Advanced WordPress MCP Architecture & Enterprise AI,
which introduces wp scaffold plugin-tests in a single lesson. Here, that’s the
starting point, not the destination.