Page MenuHomePhabricator

Document MediaWiki integration tests
Closed, ResolvedPublic

Description

Complete and organize the documentation for the MediaWiki API integration tests by building on the docs currently in the project readme.

To do

  • Create a page on mediawiki.org. (See proposed outline below.)
  • Add a link to the wiki page from the developer hub on mediawiki.org
  • Update the project readme. (See proposed outline below.)

Audience

  • Test runner
  • Test author
  • CI engineer
  • Operations engineer

Proposed wiki page outline

This is a working outline based on the initiative user stories.

  • Overview
  • Setting up a testing environment
    • Installation
    • Configuration (Docker, Vagrant, and custom)
    • Resetting a wiki between tests
    • Running tests across multiple sites (user story 9)
    • Running tests with multiple sets of parameters (user story 10)
  • Running tests
    • Running all tests
    • Running specific tests
    • Running tests for extensions (user story 21)
  • Writing tests: Overview
    • When to write a test
    • Test structure
    • Hello world example
    • Validating test responses
    • Chaining requests
  • Writing tests: Action API
    • uniq, dbkey, title, sameTitle, root
    • Users
      • Fixtures: alice, bob, mindy, robby
      • Examples using random users, anonymous users, logging in, tokens, multiple agents
    • Pages
      • Examples using titles, random pages, revisions, editing, redirects
  • Contributing
  • License

Action API checklist

Examples in the Action API section should include at least the following methods:

  • account
  • action
  • actionError
  • edit (including use of param_text, param_summary, and param_user)
  • getRevision
  • getLogEntry
  • getChangeEntry
  • getHtml
  • list
  • meta
  • prop
  • token

Proposed readme outline

To avoid duplicating information, I recommend reducing the project readme and moving most of the content into the wiki page.

  • Overview
  • Documentation
  • Contributing
  • License

Location

Recommended location: //API Integration Tests

Navigation:

  • Add the page to the Wikimedia projects category
  • Consider linking from the API docs or contributing docs

Alternative: Manual: Integration testing

Navigation:

Alternative: API: Integration testing

  • Integrate with existing API docs.
  • Not as good a fit if the tests cover multiple APIs.

References

Event Timeline

apaskulin triaged this task as Medium priority.Sep 24 2019, 4:38 PM
apaskulin moved this task from Inbox to Initiatives on the Platform Engineering board.

Change 540952 had a related patch set uploaded (by Alex Paskulin; owner: Alex Paskulin):
[mediawiki/tools/api-testing@master] docs: Fix typos and add license

https://gerrit.wikimedia.org/r/540952

Change 540952 merged by jenkins-bot:
[mediawiki/tools/api-testing@master] docs: Fix typos and add license

https://gerrit.wikimedia.org/r/540952

Change 550947 had a related patch set uploaded (by Alex Paskulin; owner: Alex Paskulin):
[mediawiki/tools/api-testing@master] docs: Move content to wiki page

https://gerrit.wikimedia.org/r/550947

Change 550947 merged by jenkins-bot:
[mediawiki/tools/api-testing@master] docs: Move content to wiki page

https://gerrit.wikimedia.org/r/550947

Updated the wiki page for the REST API and reviewed with Clara.