Hernan, what about dataDriven's replaceProperties attribute?
Cheers, Marc. -- Web: http://www.efficient-webtesting.com Blog: http://mguillem.wordpress.com Hernan Castagnola wrote: > Hi everybody! > > Let's suppose that the Title of our page is formed > like this: > > Welcome <USER>, You are browsing our <LOCATION> site (for some locations) > > <LOCATION> , <USER> - Welcome (For some other locations) > > > So we want to test the the Title rules are the correct ones according to > the country you are browsing. > The tester decides to create an XML test injecting data through an > excel file. (Data Driven Testing) > > > XML Test: > > <project default="test"> > <target name="test"> > <dataDriven tableContainer="blah.xls"> > <webtest name="Blah"> > <config browser="ff3" /> > <enableJavaScript enable="false" /> > <invoke url="http://${Country_url}" description="Go to > ${Country)" /> > <verifyTitle description="Home Page Title is the correct > one" > text="${Title}" /> > </webtest> > </dataDriven> > </target> > </project> > > > But this case "${Title}" is not something static, is something like a > "Rule" that applies for different countries, and the tester doesn't want > to replace in each test the <LOCATION> field with the exact location he > want to test. Becasuse if the rule applies to 20 countries and then the > rule changes you need to change the 20 rows in the excel sheet. What he > wants to do is the folowing > > Having an excel sheet like this: > > | Country | Username | Title | > | Argentina | Pepe | Welcome ${Username}, You are browsing our > ${Country} site | > | Peru | Juancito | Welcome ${Username}, You are browsing our ${Country} > site | > | Usa | John | ${Country} ,${Username} - Welcome | > | United Kingdom | Dirk | ${Country} , ${Username} - Welcome | > > This way if the rule changes we just replace the old rule with the new > rule format (Ctrl+f - Replace) > I know that you can make that string using Excel fucntions but I am not > sure that's the best way. I think it would be better if the webtest > handle this. > > I tried to run a test using that idea and it failed. It doesn't replace > ${Country} with the one in the field that corresponds in the excel sheet. > Do you think this would be a good feature to include to the webtest? Is > there any way around to do this? > > Thanks everybody! > > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

