On Thu, Aug 30, 2012 at 1:11 AM, Oren Bochman orenbochman@gmail.com wrote:
I've tried to do this for translate ext last week - so here are a couple of questions:
- is successfully runnig the test a requirement to successfully score on
gerrit? (i.e. how is gerrit integrated)
Jenkins sets a Verified +1 or -1 on the change, depending on whether the tests succeed or not, just like for core. A V+1 is required to merge a change. So to merge any change into an extension, the tests (that is, the core tests and any extension tests) have to pass. But the extension isn't required to have tests, it's just that you can't submit changes that break the core tests or break any tests that are present in the extension. Existing extensions without any tests or awareness of phpunit will continue to work just fine, as long as they don't try to do crazy stuff that breaks a test in core.
- does the extension need to include php unit?
No, all of the phpunit wrapper stuff is in MediaWiki core. Adding tests to extensions is simple, see https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Writing_unit_tests_fo... .
Roan