Hi Thomas,

which version of WebTest do you use? Have you tried with the latest build?

Marc.

Kappen, Thomas, TECON Terenci wrote:
> Hi Marc,
> 
> I have tried to implement the groovy script snippets in my test. But that did 
> not work:
> 
> webtest doesn't support the nested "groovyScript" element.
> webtest doesn't support the nested "groovy" element.
> 
> According to the WebTest.dtd, this message is correct. The <groovyScript> and 
> <groovy> element are not defined.
> 
> 
> Can you help?
> 
> 
> Cheers,
> Thomas
> 
> 
> -----Original Message-----
> From: Marc Guillemot [mailto:[EMAIL PROTECTED] 
> Sent: Donnerstag, 1. März 2007 16:26
> To: [EMAIL PROTECTED]
> Subject: [Webtest] RE: [dev] Best way to extend WebTest configuration 
> possibilities
> 
> 
> Hi Thomas,
> 
> (b) may be badly documented, (c) is in the javadoc but would require a
> dedicated documentation page (cf WT-240) and (d) is quite good documented.
> 
> first a quick workaround could be as first step of your <webTest>:
> <groovy>
> step.context.webClient.pageCreator = new MyCustomPageCreator()
> </groovy>
> 
> To make my idea more explicit, here is an example how this could look like
> once it is available: somewhere in your ant script you would just need
> something like
> <groovyScript>
> project.references['webtest.hotspot.pageCreator'] = new
> MyCustomPageCreator()
> /groovyScript>
> 
> or 
> 
> <groovyScript>
> class MyCustomPageCreator extends DefaultPageCreator
> {
> ...
> }
> 
> project.references['webtest.hotspot.pageCreator'] = new
> MyCustomPageCreator()
> </groovyScript>
> 
> and this page creator would be available for ALL webtest tests for which
> this project is visible.
> 
> If you want to provide a patch to make this working I would add later a
> mechanism to extract documentation for it.
> 
> Concerning your file extension patch, please open a new issue for it and
> attach it there.
> 
> Marc.
> 
> 
> Kappen, Thomas, TECON Terenci wrote:
>> Hi Marc,
>>
>> please forgive the response to your suggestions. But I'm occupied by the
>> projects in our office.
>>
>>
>> Your proposal to solve the issue does make sense. Sadly, I'm not
>> familiar with the configuration options b, c, and d. And I'm afraid they
>> are not documented very well. Actually, I didn't find any information
>> about these options on the projects home page.
>>
>> If you implement the issue as you proposed, can you give me a sample
>> script/code how to use a custom PageCreator, please?
>>
>> Subsequently, another minor issue pops up. XHTML responses will be
>> logged as xml files. It would be nicer, if they would be logged with the
>> .html extension (see the attached patch).
>>
>> Kind Regards,
>> Thomas
>>
>>
>> PS: When do you plan the next release of Canoo WebTest?
>>
>>
>> -----Original Message-----
>> From: Marc Guillemot [mailto:[EMAIL PROTECTED] 
>> Sent: Donnerstag, 22. Februar 2007 13:47
>> To: [EMAIL PROTECTED]
>> Subject: [Webtest] [dev] Best way to extend WebTest configuration
>> possibilities
>>
>> Hi,
>>
>> currently we have basically 4 kinds of possibilities to configure
>> WebTest:
>> (a) using one of the existing <config> attributes
>> (b) using a System property (like webtest.connectioninitializer)
>> (c) calling a static helper method like XPathHelper.registerGlobalXxxx
>> (d) using a script step within <webtest> to configure the running test
>>
>> WT-270 (http://webtest-community.canoo.com/jira/browse/WT-270) contains 
>> a patch from Thomas Kappen following way (a) to allow to specify the 
>> class name of a custom PageCreator. This way is fully valid but first I 
>> fear that too many configuration options have the same right to belong 
>> to config than PageCreator. Second this requires having the custom class
>>
>> present in the classpath.
>>
>> What about defining a key like "webtest.hotspot.pageCreator" and using 
>> it to look in Project's reference map for a customized entry? (for info:
>>
>> an Ant Project can contain references to any kind of objects in this 
>> map) WebTest could look at it during configuration and use the page 
>> creator it finds there if any. Major advantage: it would be possible to 
>> define a custom page creator on the fly with for instance a small Groovy
>>
>> script. This strategy could be used for other extension points. The only
>>
>> "issue" here concern the documentation. I can imagine adding new xdoclet
>>
>> tags to generate this documentation automatically and to keep it
>> accurate.
>>
>> Any thoughts?
>>
>> Marc.
>>
>>
>> _______________________________________________
>> 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