[Webtest] Where does WebTest run?

Lisa Crispin Lisa Crispin <lisa.crispin@gmail.com>
Mon, 25 Jul 2011 12:46:14 -0600


--0015174761f4dac90304a8e93a97
Content-Type: text/plain; charset=ISO-8859-1

We use variables for hostname and port in the config.xml file, and pass
those in as -D parameters when we run the test, eg., here is a script I use
to run locally:
ant -DwebTestSrc=/Users/lcrispin/code/fast401k/src/web_test
-Dwebtesthome=/Users/lcrispin/canoo -Dhostname=chester  -Dport=80
-DresultsPath=/Users/lcrispin/canoo/logs/chester_results
-DcanooTestToRun=$1.xml run-one-cano

Here's my config.xml:
<config
    host="${hostname}"
    browser="IE7"
    protocol="http"
    port="${port}"
    basepath="/"
    resultpath="${resultsPath}"
    resultfile="result.xml"
    summary="true"
    showhtmlparseroutput="false"
    saveresponse="true"
    haltonerror="false"
    haltonfailure="false"
    easyajax="true" >
    <option name="ThrowExceptionOnScriptError" value="true"/>
</config>

Here's the ant target for that in the build.xml:
         <!-- the canoo tests are run using wt.full found in webtest.xml
residing in the canoo home directory
               webtest.xml is included at the top of build.xml -->
    <target name="run-one-canoo" depends="init" description="Runs specified
canoo test (requires running application).">
        <property name="wt.testInWork"
value="${test.webtest.scripts.dir}/${canooTestToRun}"/>
        <echo message="wt.full in ${webtesthome}"/>
        <antcall target="wt.full" />
    </target>

Does that help? In our Jenkins build, we pass parameters via the Jenkins
config.
-- Lisa

On Mon, Jul 25, 2011 at 12:28 PM, Patrick Burghardt <
PBurghardt@advantageiq.com> wrote:

>  I have WebTest running on my local computer.  I want it to run on a
> server to which I have mapped a drive, but I still want to control it from
> my local drive.  I test this by going to a website that tells me what my IP
> address is.  I can specify webtest.home to be on the server, but I still
> show my local IP.  ****
>
> ** **
>
> Maybe my question is most simply stated: What determines which environment
> I am simulating?****
>



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
Contributor to _Beautiful Testing_ (O'Reilly 2009)
http://lisacrispin.com
@lisacrispin on Twitter
http://entaggle.com/lisacrispin

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

We use variables for hostname and port in the config.xml file, and pass tho=
se in as -D parameters when we run the test, eg., here is a script I use to=
 run locally:<br>ant -DwebTestSrc=3D/Users/lcrispin/code/fast401k/src/web_t=
est -Dwebtesthome=3D/Users/lcrispin/canoo -Dhostname=3Dchester=A0 -Dport=3D=
80 -DresultsPath=3D/Users/lcrispin/canoo/logs/chester_results -DcanooTestTo=
Run=3D$1.xml run-one-cano<br>
<br>Here&#39;s my config.xml:<br>&lt;config <br>=A0=A0=A0 host=3D&quot;${ho=
stname}&quot;<br>=A0=A0=A0 browser=3D&quot;IE7&quot;<br>=A0=A0=A0 protocol=
=3D&quot;http&quot;<br>=A0=A0=A0 port=3D&quot;${port}&quot;<br>=A0=A0=A0 ba=
sepath=3D&quot;/&quot;<br>=A0=A0=A0 resultpath=3D&quot;${resultsPath}&quot;=
<br>
=A0=A0=A0 resultfile=3D&quot;result.xml&quot;<br>=A0=A0=A0 summary=3D&quot;=
true&quot;<br>=A0=A0=A0 showhtmlparseroutput=3D&quot;false&quot;<br>=A0=A0=
=A0 saveresponse=3D&quot;true&quot;<br>=A0=A0=A0 haltonerror=3D&quot;false&=
quot;<br>=A0=A0=A0 haltonfailure=3D&quot;false&quot;<br>
=A0=A0=A0 easyajax=3D&quot;true&quot; &gt;<br>=A0=A0=A0 &lt;option name=3D&=
quot;ThrowExceptionOnScriptError&quot; value=3D&quot;true&quot;/&gt;<br>&lt=
;/config&gt;<br><br>Here&#39;s the ant target for that in the build.xml:<br=
>=A0=A0=A0=A0=A0=A0=A0=A0 &lt;!-- the canoo tests are run using wt.full fou=
nd in webtest.xml residing in the canoo home directory<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 webtest.xml is included at the t=
op of build.xml --&gt;<br>=A0=A0=A0 &lt;target name=3D&quot;run-one-canoo&q=
uot; depends=3D&quot;init&quot; description=3D&quot;Runs specified canoo te=
st (requires running application).&quot;&gt;<br>
=A0=A0=A0=A0=A0=A0=A0 &lt;property name=3D&quot;wt.testInWork&quot; value=
=3D&quot;${test.webtest.scripts.dir}/${canooTestToRun}&quot;/&gt;<br>=A0=A0=
=A0=A0=A0=A0=A0 &lt;echo message=3D&quot;wt.full in ${webtesthome}&quot;/&g=
t;<br>=A0=A0=A0=A0=A0=A0=A0 &lt;antcall target=3D&quot;wt.full&quot; /&gt;<=
br>
=A0=A0=A0 &lt;/target&gt;<br><br>Does that help? In our Jenkins build, we p=
ass parameters via the Jenkins config.<br>-- Lisa<br><br><div class=3D"gmai=
l_quote">On Mon, Jul 25, 2011 at 12:28 PM, Patrick Burghardt <span dir=3D"l=
tr">&lt;<a href=3D"mailto:PBurghardt@advantageiq.com">PBurghardt@advantagei=
q.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">








<div link=3D"blue" vlink=3D"purple" lang=3D"EN-US">

<div>

<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">I have WebTest running on my local compute=
r.=A0 I want it
to run on a server to which I have mapped a drive, but I still want to cont=
rol
it from my local drive.=A0 I test this by going to a website that tells me
what my IP address is.=A0 I can specify webtest.home to be on the server,
but I still show my local IP.=A0 <u></u><u></u></span></font></p>

<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;"><u></u>=A0<u></u></span></font></p>

<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">Maybe my question is most simply stated: W=
hat determines
which environment I am simulating?<u></u><u></u></span></font></p>

</div>

</div>


</blockquote></div><br><br clear=3D"all"><br>-- <br>Lisa Crispin<br>Co-auth=
or with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Ag=
ile Teams_ (Addison-Wesley 2009)<br>Contributor to _Beautiful Testing_ (O&#=
39;Reilly 2009)<br>
<a href=3D"http://lisacrispin.com" target=3D"_blank">http://lisacrispin.com=
</a><br>@lisacrispin on Twitter<br><a href=3D"http://entaggle.com/lisacrisp=
in" target=3D"_blank">http://entaggle.com/lisacrispin</a><br><br>

--0015174761f4dac90304a8e93a97--