Hi Paul,

I dislike the idea to have it in WebTest itself. It would be just one
additional option for a very specific need. We have enough of these and
should avoid adding new ones.

The changes would probably just be to overwrite invokeMethod to trigger a
createNode before super.invokeMethod(...), and a nodeCompleted(..) after it.
What I haven't checked now is which kind of node should be created here to
take the captured name into account. Probably a custom subclass of
UnknownElement.

I don't think that this is so difficult and therefore I think that it can be
done "correctly" right now and not in a second time.

Cheers,
Marc.


Paul King wrote:
> 
> 
> Something like that might work.
> 
> I guess what I am interested in is what changes do we need to
> make at the WebTest-level to support such a feature. Do we
> need extra attributes on group? Attributes on something else?
> Special way to use testInfo to 'mark' something with extra metadata?
> Do we need a reportInfo attribute or dummy step? Other naming
> convention changes/hooks? XSL changes? I guess referring to
> your comments below, we should work out what "... create a 'login'
> node ..." means.
> 
> Then we can look at several options at the DSL level for
> generating the required changes, e.g. a special AntBuilder,
> macrodefs, custom interceptor, custom metaClass for Step,
> ant namespaces, manual coding (to start with if needed).
> And of course extend to Grails WebTest plugin etc.
> 
> This may be what you had in mind, just restating from my
> point of view what I think the priority is.
> 
> Paul.
> 
> Marc Guillemot wrote:
>> Hi Paul,
>> 
>> Dierk and I have discussed a bit the problematic. What about extending
>> the
>> AntBuilder used in the tests to recognize that some delegate calls should
>> be
>> wrapped in a "group" with a special name?
>> 
>> For instance in following example:
>> ----------------
>> ant.webtest(name:'groovy: Test Groovy Scripting at creation time'){
>>   macro_login(...)
>>   ...
>> }
>> ----------------
>> 
>> the (modified) Ant builder could catch the macro_login call, "see" that
>> it
>> follows the convention "macro_*" and therefore create a "login" node.
>> 
>> This support should naturally be integrated in Grails WebTest plugin, or
>> more generally in a WebTest base WebTest test class.
>> 
>> What do you think?
>> 
>> Cheers,
>> Marc.
>> 
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 
> 

-- 
View this message in context: 
http://www.nabble.com/possible-enhancement-to-reporting-tf4670777.html#a13363801
Sent from the WebTest mailing list archive at Nabble.com.

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

Reply via email to