Hi
Just to answer my own question I have figured out that I can put the
option in the WebTest.groovy as
void webtest(String name, Closure yield){
ant.testSpec(name:name){
*config(configMap) {
option(name:"IgnoreOutsideContent",value:"false")
}*
steps(){
yield.delegate = ant
yield()
}
}
}
I still have not got my head around closures . I tried doing
test.configMap = configMap { *option(name:"IgnoreOutsideContent",value:"false")
}
*But that failed
Thanks for the tool. Using the WebTest.groovy rocks
On Thu, Jan 8, 2009 at 8:44 PM, Harihara Vinayakaram <[email protected]>wrote:
> Hi
> I have picked up the test framework from Grails (i.e.) extending WebTest
> and I am trying to do something like that in my own code . I am trying to
> create a config and pass it to the webtest task but it seems to fail
>
> For example this ant task works
> <webtest ...>
> <config>
> <option name="IgnoreOutsideContent" value="false" />
> </config>
>
> .....
>
> The equivalent groovy code I have is something :
> webtest('Testing YosCare ') {
>
> for (file in scanner) {
> def test =
> getClass().classLoader.parseClass(file).newInstance()
> println ('Name of test is ' + file )
> test.ant = ant
> test.configMap = configMap
> test.fileSource = file
> test.suite()
> }
>
>
> }
>
>
>
> My question is
> Where do I pass the config . If I do
> config.put["IgnoreOutsideContent,"false"] there is no effect how do I tell
> the webtest to set the option SetIgnoreOutsideConent to false
>
> Thanks
> Regards
> Hari
>
>