<div dir="ltr"><br><div>I have had a couple of (very preliminary) conversations with Rob Lanphier along these lines.  </div><div><br></div><div>Today we support (for some value of "support") two test environments:  beta labs and test2wiki.  What might be possible in the future is to support a set of test environments beyond just beta and test2wiki.  (One example would be a test environment on bare metal, for performance-test reasons.) </div>

<div><br></div><div>I think a beta-esque test env with a db that returns to a snapshot state at particular times would be really useful.  </div><div><br></div><div>-Chris </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Wed, Mar 5, 2014 at 12:55 PM, Juliusz Gonera <span dir="ltr"><<a href="mailto:jgonera@wikimedia.org" target="_blank">jgonera@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
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.<br>


<br>
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:<br>


<br>
* 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.<br>


<br>
* Deleting some things might be either really hard or impossible. I don't think there is an API for deleting users.<br>
<br>
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.<br>
<br>
What do you think? I could draft an RFC and post to wikitech if you like the idea.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Juliusz<br>
<br>
______________________________<u></u>_________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org" target="_blank">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/<u></u>mailman/listinfo/qa</a><br>
</font></span></blockquote></div><br></div>