Wanted: Self-​​referential unit and acceptance testing plugin for WordPress

aka “Word­Press, you suck in the most Open Source way.”

Lis­ten­ing to my wife deal with plu­gin con­flicts, incon­sis­tent and poorly-​​explained struc­tural changes in dec­i­mal upgrades of Word­Press, and gen­er­ally being upset about what broke and how to fix it since she “upgraded” to the lat­est WP.

Some­body who want to, should do this: Cre­ate a real, exe­cutable, com­pre­hen­sive set of unit and func­tional tests for all of Word­Press The whole damned thing. In PHP because that’s what it’s writ­ten in. With what the “open devel­oper” com­mu­nity thinks of as com­plete test cov­er­age.

And the same for every god­damned plu­gin. Par­don me: you lazy, stu­pid, uncom­mu­nica­tive cow­boys. I don’t care if you’re sav­ing the world by work­ing “for free” and mak­ing the whole thing “bet­ter” with every “improve­ment”: the results are a black box to any­body who can’t read your mind, or glance at your opaque “ele­gant” code and see in a moment what you mean.

Some of us are stupid.

I want every speck of code, anno­tated and ver­i­fi­able with a use­ful test har­ness. And if you don’t do it, then dammit some­body who isn’t you ought to.

And take phpUnit, or some equiv­a­lent sim­ple solu­tion, and stick it in a damned WP plugin.

I’m see­ing a sim­ple list of tests, in a table orga­nized by func­tion name or class or mod­ule of the software—whatever you want—and a sim­ple descrip­tive name, a link to dive down into the code of the test, and a red or green indi­ca­tor sit­ting there to show whether the test passed or not.

And so you install WP clean for an empty new blog with pris­tine un-​​munged plu­g­ins, OOTB, and you go to the TEST plu­gin page, and you click “run” and you get all green boxes.

Or if you upgrade from an ear­lier ver­sion, you have all your wonky con­tent and maybe some legacy plu­g­ins, and you go to the TEST plu­gin page, and you click “run” and you get some RED boxes.

And of course, at that point, you know what you broke and poten­tially how to fix it.

Or am I miss­ing the accom­pa­ny­ing unit tests in WP? Are they in some .php file I can’t quite put my fin­ger on?

I’m old; maybe it’s my eyes. That must be it.

One thought on “Wanted: Self-​​referential unit and acceptance testing plugin for WordPress

  1. or glance at your opaque “ele­gant” code and see in a moment what you mean.

    They don’t have any idea, either. This is from taxonomy.php

    * It appears that this func­tion can be used to find all of the names inside of
    * $wp_​taxonomies global vari­able.
    [snip a lit­tle]
    * @internal
    * This is all con­jec­ture and might be par­tially or com­pletely inaccurate.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>