[Webtest] Troubles with Grails plugin

Jonathan Rosenberg Jonathan Rosenberg <jr@tabbysplace.org>
Tue, 1 Nov 2011 13:34:36 -0400


--000e0cd5a2fef2fba204b0afc463
Content-Type: text/plain; charset=ISO-8859-1

If you just tried this

            option(name:'ThrowExceptionOnScriptError', value:'false')

it won't work.

You need to surround with config,as in


config {
  option(name: ThrowExceptionOnScriptError', value:'false')

}

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

On Nov 1, 2011 10:14 AM, "mascis" <juho.piirto@gmail.com> wrote:

>
> Neither of them seems to be working. This:
> ant.config(ThrowExceptionOnScriptError: 'false') causes that tests won't
> run
> and option(name:'ThrowExceptionOnScriptError', value:'false') does not work
> because WebTest assumes that this is a command and there is no command
> called "option". I also tried
> ant.option(name:'ThrowExceptionOnScriptError',
> value:'false') and several other combinations of commands mentioned earlier
> but I just can't get it work.
>
>
> Jonathan Rosenberg-2 wrote:
> >
> > Try this
> >
> >          config {
> >                  option(name:'ThrowExceptionOnScriptError',
> value:'false')
> >          }
> >
> > --
> > Jonathan Rosenberg
> > Founder & Executive Director
> > Tabby's Place, a Cat Sanctuary
> > http://www.tabbysplace.org/
> >
> >
> > On Tue, Nov 1, 2011 at 5:36 AM, Murat <murat.knecht@googlemail.com>
> wrote:
> >> Hey,
> >>
> >> did you try matching the case of your Groovy configuration to that of
> >> your XML configuration, i.e.
> >>
> >> ant.config(ThrowExceptionOnScriptError: 'false' )
> >>
> >> ?
> >>
> >> In Groovy, we re-use the XML config, so the properties will be exactly
> >> the same. Like so:
> >>
> >>                        def props = new Properties()
> >>                        props.load(new FileInputStream(f.path))
> >>
> >>
> >> Regards
> >> murat
> >>
> >>
> >> 2011/11/1 mascis <juho.piirto@gmail.com>:
> >>>
> >>> Hi,
> >>>
> >>> A new problem. I have to run tests so that WebTest ignores JS-errors.
> In
> >>> xml-tests it can be done putting in config
> >>>
> >>> <option name="ThrowExceptionOnScriptError" value="false" />
> >>>
> >>> but I can't make it work with groovy. There is config file
> >>> webtest.properties and I tried putting there lines like
> >>>
> >>> wt.option.throwexceptiononscripterror = false
> >>> or
> >>> wt.config.throwexceptiononscripterror = false
> >>>
> >>> but those did not help. I made a separete config function also like
> >>>
> >>>  void config()
> >>>                 {
> >>>                     ant.config(browser: 'FF3.6')
> >>>                     ant.config(protocol: 'https' )
> >>>                     ant.option(throwexceptiononscripterror: 'false' )
> >>> (or
> >>> ant.config(...))
> >>>                     ant.config(autorefresh: 'true')
> >>>                 }
> >>>
> >>> this did not help either though this changed browser to FF3.6 so the
> >>> function works. Any ideas about this one?
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://old.nabble.com/Troubles-with-Grails-plugin-tp32751470p32757474.html
> >>> Sent from the WebTest mailing list archive at Nabble.com.
> >>>
> >>> _______________________________________________
> >>> WebTest mailing list
> >>> WebTest@lists.canoo.com
> >>> http://lists.canoo.com/mailman/listinfo/webtest
> >>>
> >> _______________________________________________
> >> WebTest mailing list
> >> WebTest@lists.canoo.com
> >> http://lists.canoo.com/mailman/listinfo/webtest
> >>
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Troubles-with-Grails-plugin-tp32751470p32758902.html
> Sent from the WebTest mailing list archive at Nabble.com.
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

--000e0cd5a2fef2fba204b0afc463
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>If you just tried this</p><p>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 option(na=
me:&#39;ThrowExceptionOnScriptError&#39;, value:&#39;false&#39;) </p><p>it =
won&#39;t work.<br></p><p>You need to surround with config,as in</p><p><br>=
</p>

<p>config {<br>
=A0 option(name: ThrowExceptionOnScriptError&#39;, value:&#39;false&#39;)</=
p><p>}</p><p>--<br>Jonathan Rosenberg<br>Founder &amp; Executive Director<b=
r>Tabby&#39;s Place, a Cat Sanctuary<br><a href=3D"http://www.tabbysplace.o=
rg/">http://www.tabbysplace.org/</a><br>
<br></p>
<div class=3D"gmail_quote">On Nov 1, 2011 10:14 AM, &quot;mascis&quot; &lt;=
<a href=3D"mailto:juho.piirto@gmail.com" target=3D"_blank">juho.piirto@gmai=
l.com</a>&gt; wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quo=
te" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204=
, 204); padding-left: 1ex;">


<br>
Neither of them seems to be working. This:<br>
ant.config(ThrowExceptionOnScriptError: &#39;false&#39;) causes that tests =
won&#39;t run<br>
and option(name:&#39;ThrowExceptionOnScriptError&#39;, value:&#39;false&#39=
;) does not work<br>
because WebTest assumes that this is a command and there is no command<br>
called &quot;option&quot;. I also tried ant.option(name:&#39;ThrowException=
OnScriptError&#39;,<br>
value:&#39;false&#39;) and several other combinations of commands mentioned=
 earlier<br>
but I just can&#39;t get it work.<br>
<br>
<br>
Jonathan Rosenberg-2 wrote:<br>
&gt;<br>
&gt; Try this<br>
&gt;<br>
&gt; =A0 =A0 =A0 =A0 =A0config {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0option(name:&#39;ThrowExceptionOnSc=
riptError&#39;, value:&#39;false&#39;)<br>
&gt; =A0 =A0 =A0 =A0 =A0}<br>
&gt;<br>
&gt; --<br>
&gt; Jonathan Rosenberg<br>
&gt; Founder &amp; Executive Director<br>
&gt; Tabby&#39;s Place, a Cat Sanctuary<br>
&gt; <a href=3D"http://www.tabbysplace.org/" target=3D"_blank">http://www.t=
abbysplace.org/</a><br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 1, 2011 at 5:36 AM, Murat &lt;<a href=3D"mailto:murat.knec=
ht@googlemail.com" target=3D"_blank">murat.knecht@googlemail.com</a>&gt; wr=
ote:<br>
&gt;&gt; Hey,<br>
&gt;&gt;<br>
&gt;&gt; did you try matching the case of your Groovy configuration to that=
 of<br>
&gt;&gt; your XML configuration, i.e.<br>
&gt;&gt;<br>
&gt;&gt; ant.config(ThrowExceptionOnScriptError: &#39;false&#39; )<br>
&gt;&gt;<br>
&gt;&gt; ?<br>
&gt;&gt;<br>
&gt;&gt; In Groovy, we re-use the XML config, so the properties will be exa=
ctly<br>
&gt;&gt; the same. Like so:<br>
&gt;&gt;<br>
&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0def props =3D new P=
roperties()<br>
&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0props.load(new File=
InputStream(f.path))<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards<br>
&gt;&gt; murat<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2011/11/1 mascis &lt;<a href=3D"mailto:juho.piirto@gmail.com" targ=
et=3D"_blank">juho.piirto@gmail.com</a>&gt;:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; A new problem. I have to run tests so that WebTest ignores JS-=
errors. In<br>
&gt;&gt;&gt; xml-tests it can be done putting in config<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &lt;option name=3D&quot;ThrowExceptionOnScriptError&quot; valu=
e=3D&quot;false&quot; /&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; but I can&#39;t make it work with groovy. There is config file=
<br>
&gt;&gt;&gt; webtest.properties and I tried putting there lines like<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; wt.option.throwexceptiononscripterror =3D false<br>
&gt;&gt;&gt; or<br>
&gt;&gt;&gt; wt.config.throwexceptiononscripterror =3D false<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; but those did not help. I made a separete config function also=
 like<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; =A0void config()<br>
&gt;&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {<br>
&gt;&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ant.config(browser: &#=
39;FF3.6&#39;)<br>
&gt;&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ant.config(protocol: &=
#39;https&#39; )<br>
&gt;&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ant.option(throwexcept=
iononscripterror: &#39;false&#39; )<br>
&gt;&gt;&gt; (or<br>
&gt;&gt;&gt; ant.config(...))<br>
&gt;&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ant.config(autorefresh=
: &#39;true&#39;)<br>
&gt;&gt;&gt; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; this did not help either though this changed browser to FF3.6 =
so the<br>
&gt;&gt;&gt; function works. Any ideas about this one?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; View this message in context:<br>
&gt;&gt;&gt; <a href=3D"http://old.nabble.com/Troubles-with-Grails-plugin-t=
p32751470p32757474.html" target=3D"_blank">http://old.nabble.com/Troubles-w=
ith-Grails-plugin-tp32751470p32757474.html</a><br>
&gt;&gt;&gt; Sent from the WebTest mailing list archive at Nabble.com.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; WebTest mailing list<br>
&gt;&gt;&gt; <a href=3D"mailto:WebTest@lists.canoo.com" target=3D"_blank">W=
ebTest@lists.canoo.com</a><br>
&gt;&gt;&gt; <a href=3D"http://lists.canoo.com/mailman/listinfo/webtest" ta=
rget=3D"_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
&gt;&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; WebTest mailing list<br>
&gt;&gt; <a href=3D"mailto:WebTest@lists.canoo.com" target=3D"_blank">WebTe=
st@lists.canoo.com</a><br>
&gt;&gt; <a href=3D"http://lists.canoo.com/mailman/listinfo/webtest" target=
=3D"_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; WebTest mailing list<br>
&gt; <a href=3D"mailto:WebTest@lists.canoo.com" target=3D"_blank">WebTest@l=
ists.canoo.com</a><br>
&gt; <a href=3D"http://lists.canoo.com/mailman/listinfo/webtest" target=3D"=
_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
&gt;<br>
&gt;<br>
<br>
--<br>
View this message in context: <a href=3D"http://old.nabble.com/Troubles-wit=
h-Grails-plugin-tp32751470p32758902.html" target=3D"_blank">http://old.nabb=
le.com/Troubles-with-Grails-plugin-tp32751470p32758902.html</a><br>
Sent from the WebTest mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
WebTest mailing list<br>
<a href=3D"mailto:WebTest@lists.canoo.com" target=3D"_blank">WebTest@lists.=
canoo.com</a><br>
<a href=3D"http://lists.canoo.com/mailman/listinfo/webtest" target=3D"_blan=
k">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
</blockquote></div>

--000e0cd5a2fef2fba204b0afc463--