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.)
- [ ] Update the project readme. (See proposed outline below.)
- [ ] Set up autogenerated documentation using jsdocs based on [[ https://github.com/MusikAnimal/pageviews/search?q=jsdocs&unscoped_q=jsdocs | MusikAnimal/pageviews ]].
## 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
* Utilities
* uniq, dbkey, title, sameTitle
* others?
* Fixtures
* alice, bob, mindy, robby
* Action API
* Users
* 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
Since information drift is inevitable with duplicated information, I recommend reducing the project readme and moving most of the content into the wiki page.
* Overview
* Documentation
* Contributing
* License
## Location
Recommended location: //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.
Alternative: //API: Integration testing//
* Integrate with existing API docs.
* Not as good a fit if the tests cover multiple APIs.
## References
* https://gerrit.wikimedia.org/g/mediawiki/tools/api-testing
* https://www.mediawiki.org/wiki/Core_Platform_Team/Initiatives/Add_API_integration_tests
* https://www.mediawiki.org/wiki/Selenium/Node.js