2011-03-30 31 views
2

我們設置了一個Canoo webtest來測試多語言環境應用程序。對於每種語言環境,webtest都會從屬性文件中加載一些屬性。Canoo/Ant屬性在任務和步驟中的範圍不同?

在下面的例子中,locale_code,htaccess.username,htaccess.password和webtest_url都在這樣的屬性文件中定義。 (例如) 「CatalogueOrderFriendsCountry DE-DE http://www.example.com」中。

在調用步驟的性質,但是,不會被替換,並與說明書顯示爲「Einstieg Hauptseite $ {webtest_url}」 即使它們是正確的更換僅一個它上面的行。

<project default="test"> 
    <import file="../../definitions.xml"/> 
    <target name="test" depends="wt.defineMacros"> 
    <webtest name="CatalogueOrderFriendsCountry ${locale_code} ${webtest_url}"> 

     <invoke username="${htaccess.username}" password="${htaccess.password}" url="${webtest_url}" description="Einstieg Hauptseite ${webtest_url}"/> 
     ... 

這是很明顯的是,區域特定的屬性文件被加載,我們可以更改文件中的webtest_url(例如)和新的值在WebTest的名稱正確更換。我很少知道螞蟻(Canoo是我的暴露點),對Canoo webtest很少(我最近繼承了它們),所以我甚至不確定這是網絡測試還是螞蟻問題。

回答