Hi,
It was bug of Grails. I don't want configure WebTest to ignore js errors :),
I have made some workaround for test and placed this bug into corresponding
Jira http://jira.codehaus.org/browse/GRAILS-2081.
Thanks.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Marc Guillemot
Sent: Thursday, December 20, 2007 11:08 AM
To: [email protected]
Subject: Re: [Webtest] Canoo WebTest errors when using jsecurity plugin

Hi,

this means that your page references the javascript file
http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/j/application.js
which doesn't exist.

"normal" browsers simply ignore it but WebTest helps to find potential 
errors that may cause troubles later like this and complains (in fact, 
with next HtmlUnit version it won't be reported as an error anymore but 
just as a warning).

In such a case, the wise way is to fix your application. If you don't 
want (or can't), you can configure WebTest to ignore js errors but...

Marc.
-- 
Blog: http://mguillem.wordpress.com


Ruslan Roz wrote:
> I have been using the Canoo WebTest plugin for functional testing of
Grails
> application.
> When I run following test method: 
> 
> def testLoginLogOutListNewDelete() {
>       webtest('teLoginLogOut basic operations: view list, create new
> entry, view, edit, dele, view') {
>                       invoke(url: "http://localhost:8080/LIFT/auth/login";)
>       }
> }
> 
> I get the following errors:
> 
>      [java]  INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
> response for url: http://localhost:8080/LIFT/auth/login
> 2007-12-18 15:07:41.192:/LIFT:INFO:  GSP servlet initialized
> 2007-12-18 15:07:44.926:/LIFT:INFO:  Initializing Spring FrameworkServlet
> 'grails-errorhandler'
>      [java] ERROR (com.gargoylesoftware.htmlunit.html.HtmlPage) - Error
> loading javascript from
> [http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/j
> /application.js] status=[404 Not Found]
>      [java] ERROR (com.gargoylesoftware.htmlunit.html.HtmlPage) - Error
> loading javascript from
> [http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/j
> /application.js]:
>      [java] com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException:
> 404 Not Found for
http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/js/app
> ication.js
>      [java]     at
>
com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.j
> ava:845)
>      [java]     at
>
com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlP
> age.java:775)
>      [java]     at
>
com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri
> pt.java:229)
> 
> Anyone know what the problem is? Thanks.
> 
> Ruslan
> 
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to