Complete and organize the documentation for the MediaWiki API integration tests by building on the docs currently in the project readme.
- 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.)
- Test runner
- Test author
- CI engineer
- Operations engineer
Proposed wiki page outline
This is a working outline based on the initiative user stories.
- Setting up a testing environment
- 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
- Fixtures: alice, bob, mindy, robby
- Examples using random users, anonymous users, logging in, tokens, multiple agents
- Examples using titles, random pages, revisions, editing, redirects
Action API checklist
Examples in the Action API section should include at least the following methods:
- edit (including use of param_text, param_summary, and param_user)
Proposed readme outline
To avoid duplicating information, I recommend reducing the project readme and moving most of the content into the wiki page.
Recommended location: //API Integration Tests
- Add the page to the Wikimedia projects category
- Consider linking from the API docs or contributing docs
Alternative: Manual: Integration testing
- Add a link from the dev hub (https://www.mediawiki.org/wiki/Developer_hub) alongside Browser testing and Unit testing.
- Add the page to https://www.mediawiki.org/wiki/Category:Testing.
- Not part of the core distribution, so probably doesn't belong in Manual:
Alternative: API: Integration testing
- Integrate with existing API docs.
- Not as good a fit if the tests cover multiple APIs.