You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Chris Poulsen (JIRA)" <ji...@apache.org> on 2013/11/27 22:08:36 UTC

[jira] [Updated] (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:all-tabpanel ]

Chris Poulsen updated TAP5-2239:
--------------------------------

    Attachment: JSErrorCollector@jsourcerer.com.xpi
                Check_browser_javascript_errors.patch

> 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
>         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.1#6144)