Last modified: 2014-10-15 22:30:41 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 T74098, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72098 - QA: browser tests don't detect or report HTTP response errors
QA: browser tests don't detect or report HTTP response errors
Status: RESOLVED WONTFIX
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-15 22:00 UTC by spage
Modified: 2014-10-15 22:30 UTC (History)
3 users (show)

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


Attachments

Description spage 2014-10-15 22:00:34 UTC
Browser tests explicitly load pages and click buttons that load pages.

Neither seems to detect outright page load failures. E.g. https://integration.wikimedia.org/ci/job/browsertests-Flow-en.wikipedia.beta.wmflabs.org-linux-chrome-sauce/263/testReport/%28root%29/Actions%20menu%20Permalink/Topic_Actions_menu_Permalink/ failed with status 500 response and a printed exception, but the test instead reported
    Sauce Labs job URL: http://saucelabs.com/jobs/b15aad5529da47ea979bb0196f17c320

timed out after 5 seconds, waiting for {:css=>".flow-topic h2", :index=>0, :tag_name=>"h2"} to become present (Watir::Wait::TimeoutError)

Like "page has no ResourceLoader errors" (implemented) and "browser tests should assert there are no pink error boxes on the page" (bug 61304), most tests should have an easy way to indicate that an error in a page load should fail outright with something like "unexpected HTTP response (500)".

However, note the comment in http://stackoverflow.com/a/5629462/451712 : "There's a bit of a philosophical debate on whether watir or watir-webdriver should provide HTTP return code information." so this may be hard to fix.  Since beta and production show errors slightly differently, and some HTTP response errors have friendlier HTML content like "Wikipedia does not have an article with this exact name", I'm not sure how to easily and generically detect from page content that there's been a breakdown, even though it's obvious to a human being :)
Comment 1 Chris McMahon 2014-10-15 22:22:39 UTC
It's nothing to do with watir, the Selenium maintainers have been explicit from the very beginning that Selenium will never read HTTP response codes.

If you care about those, you'll need to run your HTTP through a proxy of some sort and do the analysis there and not in the browser.

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


Navigation
Links