You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/08/20 10:32:26 UTC

[jira] [Commented] (TAP5-2239) T5.4 Detect javascript errors while running selenium tests

    [ https://issues.apache.org/jira/browse/TAP5-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14103610#comment-14103610 ] 

Jochen Kemnade commented on TAP5-2239:
--------------------------------------

Can you think of a way to do this in a cross-browser fashion? Maybe we can exchange the {{t5/core/console}} module for the tests?

> T5.4 Detect javascript errors while running selenium tests
> ----------------------------------------------------------
>
>                 Key: TAP5-2239
>                 URL: https://issues.apache.org/jira/browse/TAP5-2239
>             Project: Tapestry 5
>          Issue Type: Improvement
>    Affects Versions: 5.4
>            Reporter: Chris Poulsen
>              Labels: patch
>         Attachments: Check_browser_javascript_errors.patch, JSErrorCollector@jsourcerer.com.xpi
>
>
> I've been wondering why it wasn't possible for selenium-based tests to report back javascript errors as test failures, as they usually indicate some kind of error.
> Taking yet another swing at this a couple of days ago I stumbled upon a firefox plugin (https://github.com/mguillem/JSErrorCollector - Apache v2 licensed) for collecting javascript console errors.
> The plugin is made for webdriver, but it was trivial to get it going with selenium1.
> The attached patch registers a testng listener that after each successful selenium test checks to see if an error was registered in the browser console. In case an error happened; the test success is changed to a failure and some info from the console is set as the throwable.
> To get things going apply the attached patch, and drop the attached xpi into the tapestry-core/src/test/conf/ff_profile_template/extensions folder.
> Then run the core tests. The plugin can be used the other selenium tests by providing the extensions folder in their src/test/conf/ff_profile_template
> This test add-on exposes the ajaxformloop failure reported as TAP5-2228 and TAP5-2230, a place or two where something fails with requirejs related error and one or two other trivialities on my windows machine.



--
This message was sent by Atlassian JIRA
(v6.2#6252)