Hey,
I added a phpunit xml file to the Ask library [0] which enables you to run the tests like
j@wd42:~/www/extensions/Ask$ phpunit
or
j@wd42:~$ phpunit --configuration www/extensions/Ask/phpunit.xml.dist
This will invoke the test bootsrtap code that loads the dependencies, production classes and test classes. Improvements over our previous situation:
* The tests are now run without MediaWiki - we thus know when a dependency on MW sneaks in * The tests are now run without MediaWiki - so they now take "0" seconds to run rather than 5 * Since the config file specifies a directory, there no longer is the need to register each test file somewhere.
This mail is about the later point.
Not having to register the test files is good. Less maintenance. Less likely people forget to register their tests (this somehow did happen quite a few times during the project so far).
I'll be adding similar test config and bootstrapping code to Diff and DataValues soonish. Might be a bit more tricky for the different Wikibase extensions and components.
We can however not quite get rid of the test registration code yet if we want to continue running the tests via the MediaWiki test runner. This runner currently, as far as I know, does not support registering those config files or directories or whatever. So we might want to look into making some improvements there to get rid of the registration code.
[0] https://gerrit.wikimedia.org/r/#/c/62589/
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
wikidata-tech@lists.wikimedia.org