[QA] Investigate logging common JavaScript exceptions

S Page spage at wikimedia.org
Thu Feb 26 02:43:23 UTC 2015


On Feb 24, 2015 2:14 PM, "Jon Robson" <jrobson at wikimedia.org> wrote:

> I wonder is if the browser tests can log any JavaScript console errors
> it encounters during test runs somewhere. This would be added
> protection for us to prevent errors leaking into production. I've
> cc'ed QA in case they have any ideas about that.

We do have step "page has no ResourceLoader errors" assertion in the
mediawiki_selenium gem [1], you should add it after every visit page
(T59304) and perhaps after actions that dynamically load additional modules.

> >> We get various errors such as Error: Module not found: toast Error:
Module
> >> not found: toast
> >> When these occur it would be good to somehow log this to catch
dependency problems.

That sounds like there was an RL error.

Detecting arbitrary JS errors after the module loads is more challenging as
others have written.

https://phabricator.wikimedia.org/T46299 has Krinkle's words of wisdom.
https://gerrit.wikimedia.org/r/#/c/57413/ means qunit tests should catch
these runtime failures; I don't know where we stand on running qunit on
different browsers.

[1]
https://github.com/wikimedia/mediawiki-selenium/blob/master/lib/mediawiki_selenium/step_definitions/resource_loader_steps.rb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20150225/56572333/attachment-0001.html>


More information about the QA mailing list