quality@glassfish.java.net

Re: testng question

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Wed, 27 May 2009 10:49:50 +1000

Hi Lidia,

I always specify them in the testng target in the ant file I invoke
TestNG from:

     <testng verbose="2"
             classpathref="testdriver.path">
         <sysproperty key="appHost" value="${host}" />
         [...]
     </testng>

Would that work for you?

Regards,
Dies


lidia wrote:
> Hi all
>
> Hope we have some TestNG gurus on this alias...
>
> I'm trying to pass some variables to testng, such as host, port, etc.
> These are defined in ant build.properties, e.g.:
>
> host=localhost
>
> However, the following code in testng.xml is not resolved:
>
> <parameter name="appHost" value="${host}">
>
> Instead the string ${host} is assigned to parameter appHost... If
> anyone knows the best way to pass parameters that are variables to
> testng, please let me know.
>
> thanks
> lidia
>