【发布时间】:2011-07-26 00:28:36
【问题描述】:
我们设置了 Canoo webtest 来测试多语言环境应用程序。对于每个语言环境,webtest 会从属性文件中加载一些属性。
在下面的示例中,locale_code、htaccess.username、htaccess.password 和 webtest_url 都定义在这样一个属性文件中。
在webtest任务本身中,${locale_code}被替换,导致(例如) "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 名称中正确替换新值。
我对 ant 几乎一无所知(Canoo 是我接触过的),对 Canoo webtest 知之甚少(我最近继承了它们),所以我什至不确定这是 webtest 还是 ant 问题。
【问题讨论】:
标签: ant properties canoo