Extension:WikimediaEditorTasks/Testing environment setup

A testing environment is set up on the  instance in the mobile project in Cloud VPS.

The environment consists of a Wikidata instance (wikidata-edit-counts.wmflabs.org) and six client Wikipedias ({en,es,fr,he,ru,zh}-edit-counts.wmflabs.org). You can create new global user accounts there, create and edit new Wikidata items and Wikipedia pages and link them together freely. A working version of the production in-app description edit counter is enabled, so per-language counts of in-app description edits by logged-in users will be maintained. (Whether the request is in-app is determined by whether the User-Agent header begins with the string " ").

An unfortunate limitation of this testing environment is that provisioning any of the  or   or   roles breaks the proxy setup that maps prefixed subdomains to the hosted MW-Vagrant instance's various internal wikis. As a result, pages from the client Wikipedias can't be loaded directly in the app. I recommend instead using the excellent Postman app to interact directly with the Action API on wikidata-edit-counts.wmflabs.org for making description edits.

Example testing flow
Create a new user on any wiki, and ensure the account is linked to and logged in on all wikis


 * See table at https:// -edit-counts.wmflabs.org/wiki/Special:CentralAuth/ for reference


 * Create a new Wikidata item
 * https://wikidata-edit-counts.wmflabs.org/wiki/Special:NewItem
 * Create pages on one or more client Wikipedias, and link them to the newly created item through the sitelinks box on its page
 * Add description(s) for the newly created item(s) in the language(s) of the linked wiki page(s) via the wikidata-edit-counts.wmflabs.org Action API, using a  User-Agent header
 * Make sure you are also logged in to the wikis (specifically ) on whatever client application you are using for this!
 * Retrieve current in-app description edit counts from the Action API via the new  module
 * https://wikidata-edit-counts.wmflabs.org/w/api.php?action=wikimediaeditortasks
 * Results will be for the user currently logged in, or an API error will be returned if no user is logged in

Testing environment setup

 * Set up MW-Vagrant in Cloud VPS as instructed on wikitech
 * Enable roles:,  , optionally   for app search (but see below)
 * IMPORTANT: Do NOT enable  or   or   (they hose the proxy setup)
 * Add entries to sites table for wikidatawiki
 * Basically, make it look like this: https://phabricator.wikimedia.org/P8088


 * Install WikimediaEditorTasks
 * Run  for all wikis to create the required db tables


 * Create user and ensure linked to all content wikis (this is fiddly)


 * Register counters for all wikis
 * for each wiki