[Webtest] Setting ThrowExceptionOnScriptError globally
Noam Aigerman
Noam Aigerman <noama@answers.com>
Sat, 07 Jun 2008 01:03:58 +0300
This is a multi-part message in MIME format.
--Boundary_(ID_/fQ/y7UZL34CiACQlBOIbA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
So where should I put
<option name="ThrowExceptionOnScriptError" value="false"/>
I tried put it in webtest.xml in <target name="wt.testInWork"...
But that didn't work... under which tag should I put it?
________________________________
From: Soula, William [mailto:wsoula@pointserve.com]
Sent: Friday, June 06, 2008 11:14 PM
To: webtest@lists.canoo.com; Lisa Crispin; Noam Aigerman
Subject: RE: [Webtest] Setting ThrowExceptionOnScriptError globally
We put the config info in webtest.xml. I believe in the default
webtest.xml there are the below properties set:
<property name="wt.config.resultpath" location="results"/>
<property name="wt.config.saveresponse" value="true"/>
<property name="wt.config.summary" value="true"/>
<property name="wt.config.haltonerror" value="false"/>
<property name="wt.config.haltonfailure" value="false"/>
And you can probably just add <property name="wt.config.host"
value="value of your host"/> to that list. We have some extra targets
where we define this and some other properties based on if we are using
ssl or not which is why I can't be 100% certain this will work. We also
store the value of the host in an external properties file and just call
it as ${host} so we can change the machine it is run against easily
without opening any webtest files.
________________________________
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Lisa Crispin
Sent: Friday, June 06, 2008 3:02 PM
To: webtest@lists.canoo.com; Noam Aigerman
Subject: Re: [Webtest] Setting ThrowExceptionOnScriptError globally
We put our config stuff in a separate file, and use !ENTITY to include
it, but we are really old school WebTest, I haven't tried that macro
thing that is available now.
<!DOCTYPE project SYSTEM "file:../dtd/WebTest.dtd" [
<!ENTITY config SYSTEM "file:../modules/config.xml">
...
<project ...
<target...
<testSpec ...
&config;
I'd actually like to be able to turn that option off only for certain
tests, but not sure how to do that other than doing what you are doing.
-- Lisa
On Fri, Jun 6, 2008 at 1:19 PM, Noam Aigerman <noama@answers.com> wrote:
Hi,
How can I set a config setting for an entire project, instead for one
wbtest at a time?
At the moment I'm doing something like:
<target name="wt.testInWork">
<webtest name="test1">
<config>
<option name="ThrowExceptionOnScriptError" value="false"/>
</config>
....the test itself
</webtest>
<webtest name="test2">
<config>
<option name="ThrowExceptionOnScriptError" value="false"/>
</config>
....the test itself
</webtest>
Etc...
</target>
How can I define the config only once?
--
Lisa Crispin
Co-author with Janet Gregory, Agile Testing
http://www.agiletester.ca
http://lisa.crispin.home.att.net
http://lisacrispin.blogspot.com
--Boundary_(ID_/fQ/y7UZL34CiACQlBOIbA)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.45pt 841.7pt;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>So where should I put <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><option name="ThrowExceptionOnScriptError"
value="false"/><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I tried put it in webtest.xml in <target
name="wt.testInWork"…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>But that didn’t work… under
which tag should I put it?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Soula, William
[mailto:wsoula@pointserve.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 06, 2008 11:14
PM<br>
<b><span style='font-weight:bold'>To:</span></b> webtest@lists.canoo.com; Lisa
Crispin; Noam Aigerman<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [Webtest] Setting
ThrowExceptionOnScriptError globally</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>We put the config info in
webtest.xml. I believe in the default webtest.xml there are the below
properties set:</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'> <property
name="wt.config.resultpath" location="results"/><br>
<property name="wt.config.saveresponse"
value="true"/><br>
<property name="wt.config.summary"
value="true"/><br>
<property name="wt.config.haltonerror"
value="false"/><br>
<property name="wt.config.haltonfailure"
value="false"/></span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>And you can probably just add <property
name="wt.config.host" value="<em><i><font face=Arial><span
style='font-family:Arial'>value of your host</span></font></i></em>"/>
to that list. We have some extra targets where we define this and some
other properties based on if we are using ssl or not which is why I can't be
100% certain this will work. We also store the value of the host in an
external properties file and just call it as ${host} so we can change the
machine it is run against easily without opening any webtest files.</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabIndex=-1>
</span></font></div>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Lisa Crispin<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 06, 2008 3:02
PM<br>
<b><span style='font-weight:bold'>To:</span></b> webtest@lists.canoo.com; Noam
Aigerman<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Webtest] Setting
ThrowExceptionOnScriptError globally</span></font><o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>We put our config stuff
in a separate file, and use !ENTITY to include it, but we are really old school
WebTest, I haven't tried that macro thing that is available now.<br>
<!DOCTYPE project SYSTEM "file:../dtd/WebTest.dtd" [<br>
<!ENTITY
config
SYSTEM "file:../modules/config.xml"><br>
...<br>
<project ...<br>
<target...<br>
<testSpec ...<br>
&config;<br>
<br>
I'd actually like to be able to turn that option off only for certain tests,
but not sure how to do that other than doing what you are doing.<br>
<br>
-- Lisa<br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Fri, Jun 6, 2008 at 1:19 PM, Noam Aigerman <<a
href="mailto:noama@answers.com">noama@answers.com</a>> wrote:<o:p></o:p></span></font></p>
<div vlink=purple link=blue>
<div>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi,</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
can I set a config setting for an entire project, instead for one wbtest at a
time?</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>At
the moment I'm doing something like:</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><target
name="wt.testInWork"></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
<webtest name="test1"></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
<config> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
<option name="ThrowExceptionOnScriptError"
value="false"/></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
</config></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
….the test itself</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
</webtest></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
<webtest name="test2"></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
<config> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
<option name="ThrowExceptionOnScriptError"
value="false"/></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
</config></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
….the test itself</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
</webtest></span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
Etc…</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'></target></span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
can I define the config only once?</span></font><o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
Lisa Crispin<br>
Co-author with Janet Gregory, Agile Testing<br>
<a href="http://www.agiletester.ca">http://www.agiletester.ca</a><br>
<a href="http://lisa.crispin.home.att.net">http://lisa.crispin.home.att.net</a><br>
<a href="http://lisacrispin.blogspot.com">http://lisacrispin.blogspot.com</a> <o:p></o:p></span></font></p>
</div>
</body>
</html>
--Boundary_(ID_/fQ/y7UZL34CiACQlBOIbA)--