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

Details

Related Gerrit Patches:
mediawiki/tools/api-testing : masterdocs: Move content to wiki page
mediawiki/tools/api-testing : masterdocs: Fix typos and add license

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 24 2019, 4:37 PM
apaskulin triaged this task as Medium priority.Sep 24 2019, 4:38 PM
apaskulin moved this task from Inbox to Initiatives on the Core Platform Team board.
apaskulin updated the task description. (Show Details)Sep 24 2019, 4:40 PM
apaskulin updated the task description. (Show Details)Sep 30 2019, 11:38 PM
apaskulin updated the task description. (Show Details)Oct 4 2019, 12:03 AM

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

apaskulin updated the task description. (Show Details)Oct 4 2019, 7:32 PM
apaskulin updated the task description. (Show Details)Oct 4 2019, 7:34 PM

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

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

apaskulin updated the task description. (Show Details)Nov 14 2019, 7:20 PM
apaskulin updated the task description. (Show Details)Nov 14 2019, 8:14 PM

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

apaskulin updated the task description. (Show Details)Nov 15 2019, 5:30 PM

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