tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Poulsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2239) T5.4 Detect javascript errors while running selenium tests
Date Wed, 27 Nov 2013 21:08:36 GMT

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

Chris Poulsen commented on TAP5-2239:
-------------------------------------

The layout of the plugin files folder is like this:

C:\code\frameworks\tapestry-5>git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       new file:   tapestry-core/src/test/conf/ff_profile_template/extensions/JSErrorCollector@jsourcerer.com.xpi
#       new file:   tapestry-core/src/test/conf/ff_profile_template/extensions/extensions.ini
#       new file:   tapestry-test/src/main/java/org/apache/tapestry5/test/JsErrorListener.java
#       modified:   tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
#

> 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)

Mime
View raw message