Hi,

all the properties used in config have a similar usage and could be placed
in a property file that you load with the <property..> task. You can have
different property files and depending of the one you load (or the order in
wich you load them) you will be able to use different properties.

Marc.


Magic.guitar wrote:
> 
> Hi,
> I'm thinking a method for call the same external file with different
> property. I explain with an example.
> I've a script called Config.xml, like most of the examples on webtest web
> site.
> 
> Config.xml
> <config 
>   host="${host}"
>   port="${port}"
>   protocol="${protocol}"
>   basepath="${bpath}" />
> 
> and another script call TryTest.xml
> 
> TryTest.xml
> 
> <?xml version="1.0"?>
> <!DOCTYPE project SYSTEM "WebTest.dtd"[
>   <!ENTITY config     SYSTEM "Config.xml">
> ]>
> <project name="SimpleDemo" basedir="." default="main">
> 
>   <property name="webtest.home" location="C:/java/webtest" />
>   <property name="bpath" value="/" />
>   <import file="${webtest.home}/lib/taskdef.xml"/>
> 
>   <target name="main">
>     <webtest name="myTest">
>     <property name="host" value="www.google.it"/>
>     <property name="port" value="80"/>
>     <property name="protocol" value="http"/>
>       &config;
>       <steps>
>         <invoke 
>           description="get Login Page"
>           url="login" />
>         <verifyTitle 
>           description="we should see the login title"
>           text="Login Page" />
>       </steps>
>     </webtest>
>     <webtest>
>     <property name="host" value="www.email.it"/>
>     <property name="port" value="70"/>
>     <property name="protocol" value="https"/>
>       &config;
>       <steps>
>         <invoke 
>           description="get Login Page"
>           url="login" />
>         <verifyTitle 
>           description="we should see the login title"
>           text="Login Page" />
>       </steps>
>     </webtest>
>   </target>
> </project>
> 
> Well...that's all...I would to know if it's possible a thing like
> that...using Config.xml with different property...
> It's like internal and global variables...I'm asking if is it possible
> even to make a property global and use that in every Config.xml call or
> internal and use a different variable for every Config.xml call.
> 
> Thank you.
>  
> 
>  
> 
>  --
> 
>  Email.it, the professional e-mail, gratis per te: http://www.email.it/f
> 
>  
> 
>  Sponsor:
> 
>  Questo inverno scaldale il cuore, con il prezioso calore di un Diamante.
> 
> * Non lasciarti sfuggire lo sconto del 20% riservato a te! 
> 
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5630&d=22-1
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Property-in-external-file-tf3058540.html#a8520523
Sent from the WebTest mailing list archive at Nabble.com.

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to