scaffolded webtests adapted

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

scaffolded webtests adapted

Dierk König
Hi,

Scaffolded webtests now produce a long green bar in the
testreport again.

However, there is a behaviour I do not understand.

When started through SampleGenerator, the webtests fail
with HTTP 404. After having started and stopped Jetty once
(grails run-app, Ctrl-C), they run without a hitch (grails
run-webtest).

I don't have the slightest idea...

Mittie
Reply | Threaded
Open this post in threaded view
|

Re: scaffolded webtests adapted

graemer
On 01/03/06, Dierk Koenig <[hidden email]> wrote:

> Hi,
>
> Scaffolded webtests now produce a long green bar in the
> testreport again.
>
> However, there is a behaviour I do not understand.
>
> When started through SampleGenerator, the webtests fail
> with HTTP 404. After having started and stopped Jetty once
> (grails run-app, Ctrl-C), they run without a hitch (grails
> run-webtest).

Is there any exception along the way?

Graeme

>
> I don't have the slightest idea...
>
> Mittie
>
Reply | Threaded
Open this post in threaded view
|

RE: scaffolded webtests adapted

Dierk König
I don't see anything special in the logs, but maybe you.
Server startup was ok.

Mittie
----
   [groovy] Started WebApplicationContext[/myapp,/myapp]
   [groovy] Started SocketListener on 0.0.0.0:8080
   [groovy] Started org.mortbay.jetty.Server@ba5bdb

webtest-impl:
     [java] Testing myapp
     [java] Trying to override old definition of task sleep

     [java]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
R_1211.
     [java]  INFO (com.canoo.webtest.engine.Configuration) - Surfing with
browser Mozilla/4.0 (compatible; MSIE 6.0b; Wi
ndows 98)
     [java]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke
"<unknown>" (1/13)
     [java]  INFO
(com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by
URL: mydomain
     [java]  INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
response for url: http://localhost:8080/myapp
/mydomain
     [java] Opening single Hibernate Session in OpenSessionInViewFilter
     [java] Closing single Hibernate Session in OpenSessionInViewFilter
     [java]  INFO (com.gargoylesoftware.htmlunit.WebClient) -
statusCode=[404] contentType=[text/html]
     [java]  INFO (com.gargoylesoftware.htmlunit.WebClient) - <html>
     [java] <head>
     [java] <title>Error 404 Not Found</title>
     [java] </head>
     [java] <body>
     [java] <h2>HTTP ERROR: 404</h2><pre>Not Found</pre>
     [java] <p>RequestURI=/myapp/mydomain</p>
     [java] <p><i><small><a href="http://jetty.mortbay.org">Powered by
Jetty://</a></small></i></p>
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java]
     [java] </body>
     [java] </html>

     [java]  INFO (com.canoo.webtest.engine.Context) - Content of window
changed to http://localhost:8080/myapp/mydomain

     [java]  INFO (com.canoo.webtest.engine.Context) - Content loaded in
newly opened window, its content will become cu
rrent response
     [java]  INFO (com.canoo.webtest.engine.Context) - Current form set to
none
     [java]  INFO (com.canoo.webtest.engine.Context) - Current response now:
http://localhost:8080/myapp/mydomain
     [java]  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo
Webtest: R_1211.
     [java]  INFO (com.canoo.webtest.steps.Step) - Exception thrown from
this class: com.canoo.webtest.engine.StepFailed
Exception
     [java]  INFO (com.canoo.webtest.steps.Step) - Message was: Step[invoke
"<unknown>" (1/13)]: HTTP error 404, at: inv
oke
     [java]  INFO (com.canoo.webtest.ant.WebtestTask) - Test report
successfully created.
     [java]     [style] Transforming into
C:\cygwin\home\dierk\grails\samples\myapp\webtest\reports

     [java]     [style] Processing
C:\cygwin\home\dierk\grails\samples\myapp\webtest\reports\WebTestResults.xml
to C:\cy
gwin\home\dierk\grails\samples\myapp\webtest\reports\WebTestResults.html

     [java]     [style] Loading stylesheet
C:\cygwin\home\dierk\grails\downloads\webtest\resources\WebTestReport.xsl

     [java] opening:
C:\cygwin\home\dierk\grails\samples\myapp\webtest\reports\WebTestResults.htm
l
Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]
Stopped SocketListener on 0.0.0.0:8080
Closing WebApplicationContext of Spring FrameworkServlet 'grails'
Closing application context [WebApplicationContext for namespace
'grails-servlet']
Destroying singletons in factory
{org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [c
ustomEditors,exceptionHandler,multipartResolver,messageSource,localeChangeIn
terceptor,localeResolver,dataSource,sessionF
actory,transactionManager,MydomainDomainClass,MydomainPersistentClass,Mydoma
inValidator,simpleGrailsController,jspViewRe
solver,ValidationTagLibClass,ValidationTagLibTargetSource,ValidationTagLibPr
oxy,ValidationTagLib,JavascriptTagLibClass,J
avascriptTagLibTargetSource,JavascriptTagLibProxy,JavascriptTagLib,FormTagLi
bClass,FormTagLibTargetSource,FormTagLibProx
y,FormTagLib,ApplicationTagLibClass,ApplicationTagLibTargetSource,Applicatio
nTagLibProxy,ApplicationTagLib]; parent: org
.springframework.beans.factory.support.DefaultListableBeanFactory defining
beans [grailsApplication,grailsResourceHolder
]; root of BeanFactory hierarchy}
Closing Hibernate SessionFactory
closing
Running hbm2ddl schema export
exporting generated schema to database
schema export complete
Closing Spring root WebApplicationContext
Closing application context [Root WebApplicationContext]
Destroying singletons in factory
{org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [g
railsApplication,grailsResourceHolder]; root of BeanFactory hierarchy}
Shutting down Log4J
   [groovy] statements executed successfully

BUILD SUCCESSFUL
Total time: 18 seconds
C:\cygwin\home\dierk\grails\samples>






> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]On Behalf
> Of Graeme Rocher
> Sent: Mittwoch, 1. März 2006 21:49
> To: [hidden email]
> Subject: Re: [grails-dev] scaffolded webtests adapted
>
>
> On 01/03/06, Dierk Koenig <[hidden email]> wrote:
> > Hi,
> >
> > Scaffolded webtests now produce a long green bar in the
> > testreport again.
> >
> > However, there is a behaviour I do not understand.
> >
> > When started through SampleGenerator, the webtests fail
> > with HTTP 404. After having started and stopped Jetty once
> > (grails run-app, Ctrl-C), they run without a hitch (grails
> > run-webtest).
>
> Is there any exception along the way?
>
> Graeme
>
> >
> > I don't have the slightest idea...
> >
> > Mittie
> >