<div dir="ltr"><div><div>I don't know if this is the case for MediaWiki but often the kinds of APIs that you are talking about aren't possible to implement cleanly without more effort then just trashing the database and rebuilding it from scratch. That whole process is really short for mediawiki. Not short enough I'd recommend it between every test but we do it on every submitted patch just to run tests already.<br>
<br><br></div>Having a standing instance that can be burnt down to a base install might be useful but its not a whole lot different from vagrant which you can rebuild from scratch in a few minutes.<br><br></div>Nik<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 3:23 PM, Chris McMahon <span dir="ltr"><<a href="mailto:christopher.mcmahon@gmail.com" target="_blank">christopher.mcmahon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Chris </div>
</font></span></div><div class="HOEnZb"><div class="h5"><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><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>
</div></div><br>_______________________________________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/mailman/listinfo/qa</a><br>
<br></blockquote></div><br></div>