<div dir="ltr"><p dir="ltr">On Feb 24, 2015 2:14 PM, "Jon Robson" <<a href="mailto:jrobson@wikimedia.org" target="_blank">jrobson@wikimedia.org</a>> wrote:</p>
<p dir="ltr">> I wonder is if the browser tests can log any JavaScript console errors<br>
> it encounters during test runs somewhere. This would be added<br>
> protection for us to prevent errors leaking into production. I've<br>
> cc'ed QA in case they have any ideas about that.</p>
<p dir="ltr">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.</p><p dir="ltr">> >> We get various errors such as Error: Module not found: toast Error: Module<br>
> >> not found: toast<br>
> >> When these occur it would be good to somehow log this to catch dependency problems.</p><p>That sounds like there was an RL error.<br></p>
<p dir="ltr">Detecting arbitrary JS errors after the module loads is more challenging as others have written.<br></p><p dir="ltr"><a href="https://phabricator.wikimedia.org/T46299">https://phabricator.wikimedia.org/T46299</a> has Krinkle's words of wisdom. <a href="https://gerrit.wikimedia.org/r/#/c/57413/">https://gerrit.wikimedia.org/r/#/c/57413/</a> means qunit tests should catch these runtime failures; I don't know where we stand on running qunit on different browsers.<br></p><p dir="ltr">[1] <a href="https://github.com/wikimedia/mediawiki-selenium/blob/master/lib/mediawiki_selenium/step_definitions/resource_loader_steps.rb">https://github.com/wikimedia/mediawiki-selenium/blob/master/lib/mediawiki_selenium/step_definitions/resource_loader_steps.rb</a><br></p>

</div>