I'm attempting to use the value in the configuration as a property but
the syntax is wrong.

 

Here's a example  of the test file

<!DOCTYPE project  SYSTEM "../dtd/Project.dtd" >

<project name="Test_SomePage_aspx" basedir="." default="wt.testInWork">

  <property name="name" location="C:/progra~1/webtest" />

  <import file="${webtest.home}/webtest.xml" />

  <property name="wt.resultpath" location="../results" />

  <property file="../includes/login.properties" />

  <property file="../includes/pageName2.properties" />

  <target name="wt.testInWork">

    <webtest name="mytest">

            &config; <!-want to access the host property from here -->

            &login;

            <invoke description="Test_SomePage.aspx"
url="/PageDirectory/SomePage.aspx" />

            &VerifyNoError;

            <clickLink htmlId="lnkSendnMarket" />

            <!-check in the verifyProperty that the host variable is
what I want but the name is not defined when running the test -->

<verifyProperty description="verify reading host variable"
name="nMarketFeed.host" text="ksqmststgm01" /> 

            

<property name="SomeFileName"
value="${webtest.config.host}\generation\Data\rtdisp_${DSTAMP}${TSTAMP}.
xml" />

             <verifyProperty description="verify reading host variable"
name="somePage.host" text="ksqmststgm01" /> 

            

            <loadfile property="nMarketFile" srcFile="${SomeFileName}"
/>

 

The test fails because the host variable name isn't right. What's the
correct syntax to access from the config.host value?

 

Luke Templin


Reply via email to