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