Re: Where does WebTest run?

Lisa Crispin <[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <CAHF=cgBoe=i7WMBYNhb8msb2aRAEhHAF8TnEbZMdx_tJKDrc2g@mail.gmail.com>
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 <
[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.