Hi,

I briefly talked with Kaldari about an idea of having different "modes" or "environments" in MediaWiki. By "modes" I mean something that is usually present in modern web frameworks: production, development and test mode.

This could be useful to expose a particular API only in dev and test modes. An API like that could, for example, reset the whole database to its initial state which would be useful for tests for the following reasons:

* Using mediawiki_api to clean up after a test (e.g. delete a page created during the test) is prone to errors. We have to remember to do it and when we do, we'll end up with weird Cucumber steps like "And the page X is deleted after the test" which don't really belong to tests.

* Deleting some things might be either really hard or impossible. I don't think there is an API for deleting users.

Obviously, we'd need a dedicated MW instance for those tests, possibly one that could not be accessed externally. We also would not be able to run all the tests in production, but I think that's fine.

What do you think? I could draft an RFC and post to wikitech if you like the idea.

--
Juliusz

_______________________________________________
QA mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/qa

Reply via email to