Last modified: 2014-08-13 13:56:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60353, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58353 - create API level tests to monitor services on beta/test2wiki and also on production (tracking)
create API level tests to monitor services on beta/test2wiki and also on prod...
Status: NEW
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
zfilipin
: tracking
Depends on: 58555
Blocks: tracking
  Show dependency treegraph
 
Reported: 2013-12-11 21:39 UTC by Chris McMahon
Modified: 2014-08-13 13:56 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chris McMahon 2013-12-11 21:39:28 UTC
Moving discussion to here for the record: 

Some time ago we noted that while we have some reasonable unit tests in some repos, and some reasonable browser tests in some repos, we lack any consistent tests at the API or services level.  

Having such tests would be useful not only as regression tests in the test environments, but also in order to monitor the availability of key services in the production environments. UploadWizard on Commons is a case of particular note, and the upload function in particular for UW:  http://commons.wikimedia.org/w/api.php?action=help&modules=upload with the "stash" parameter. 

Matt Flaschen is also doing things along those lines:  https://gist.github.com/mattflaschen/7904894
Comment 1 Matthew Flaschen 2013-12-11 23:22:27 UTC
https://gist.github.com/mattflaschen/7904894 is not an availability test, but wikitools (https://code.google.com/p/python-wikitools/) (the library it uses) is a candidate to help write such availability tests (though there are of course other possible libraries).
Comment 2 Kunal Mehta (Legoktm) 2013-12-12 01:54:36 UTC
Pywikibot has a decently large suite of tests that actually use the live API on WMF sites: https://github.com/wikimedia/pywikibot-core/tree/master/tests

That said, what's the goal? Most API modules should have proper unit tests that check their output.
Comment 3 Matthew Flaschen 2013-12-12 02:36:09 UTC
Presumably it's intended as an end-to-end integration test.

It would apply to cases where:

* The commit itself is not broken, or at least Jenkins-run unit tests don't catch it..
* The basic "is the homepage up?" checks (e.g. http://status.wikimedia.org/) don't catch it, since the site itself still works.
* A particular API doesn't work as deployed, e.g. due to a specific production database outage.

This has probably happened in some cases.
Comment 4 Chris McMahon 2013-12-12 15:06:38 UTC
(In reply to comment #2)

> That said, what's the goal? Most API modules should have proper unit tests
> that
> check their output.

Two goals: 

The general goal is to provide test coverage along the lines of Mike Cohn's 'test pyramid':  http://www.mountaingoatsoftware.com/blog/the-forgotten-layer-of-the-test-automation-pyramid .  We have at least some coverage at the top and bottom of the pyramid, but lack coverage at the middle. 

The specific goal is also to monitor certain services in production in a reliable way using the WMF continuous integration tools. For example, some time ago Commons was configured incorrectly and media uploads stopped working, even though there was nothing wrong with the code and UploadWizard continued to work properly in test environments.
Comment 5 Greg Grossmeier 2013-12-12 22:38:34 UTC
(made this a tracking bug for the sub-tasks like creating API level tests for UploadWizard. Please report those bugs and make them blocking this one. For clarify: those bugs should be something like "UploadWizard API test for some specific interesting/fragile part of the code".)
Comment 6 aarcos.wiki 2013-12-17 00:29:11 UTC
Created bug 58555 to track the creation of basic API smoke tests for the Upload Wizard. Just updated that bug with my latest findings.
Comment 7 Željko Filipin 2014-08-09 13:32:39 UTC
Chris (and others), we now have some tests that are using the API. Can this be resolved, or is there something else to be done?
Comment 8 Matthew Flaschen 2014-08-10 02:33:48 UTC
Željko, which tests are you referring to?
Comment 10 Matthew Flaschen 2014-08-12 01:39:40 UTC
Okay, those are bug 58555's tests, right?

This is currently a tracking bug for APIs in general to test like this.  I don't know if it should be closed now (and potentially reopened if tests are wanted for other APIs), or left open.
Comment 11 Željko Filipin 2014-08-13 13:56:47 UTC
Yes, looks like I was thinking of bug 58555.

Anyway, this tracking bug does not track any other bugs, so I vote to resolve it, unless somebody adds a bug that needs to be tracked.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links