[QA] Resetting database to original state after tests

Chris McMahon christopher.mcmahon at gmail.com
Wed Mar 5 20:23:58 UTC 2014


I have had a couple of (very preliminary) conversations with Rob Lanphier
along these lines.

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.)

I think a beta-esque test env with a db that returns to a snapshot state at
particular times would be really useful.

-Chris


On Wed, Mar 5, 2014 at 12:55 PM, Juliusz Gonera <jgonera at wikimedia.org>wrote:

> 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
> QA at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/qa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140305/ba5c54d0/attachment.html>


More information about the QA mailing list