[QA] [Wikitech-l] Autodiscovery of extension unittests

Greg Grossmeier greg at wikimedia.org
Thu Aug 4 20:16:50 UTC 2016


(Adding in qa@)

<quote name="Legoktm" date="2016-08-04" time="13:08:56 -0700">
> Hi,
> 
> One thing that's always annoyed me about writing tests for an extension
> is that for the first test, you need to bootstrap it by adding a
> UnitTestsList hook, and copying the code for it from some other extension.
> 
> Now that we have a proper extension registry, I wrote
> <https://gerrit.wikimedia.org/r/#/c/302944/> (merged by Florian!), which
> will automatically register any tests in an extension's "tests/phpunit/"
> directory. If you already have a UnitTestsList hook, the tests won't be
> duplicated or anything, but it is now safe to remove the hook.
> 
> <https://phabricator.wikimedia.org/T142120> tracks updating extensions
> to do so by moving their tests into the standardized path and removing
> the hook.
> 
> Note: this requires that the extension has already been converted to use
> extension.json.

Great work, Kunal!

-- 
| Greg Grossmeier            GPG: B2FA 27B1 F7EB D327 6B8E |
| identi.ca: @greg                A18D 1138 8E47 FAC8 1C7D |



More information about the QA mailing list