[Webtest] How to read dbunit-export-files as webtestproperties
Lothar Märkle
webtest@lists.canoo.com
Thu, 12 Jan 2006 14:05:58 +0100
Hi,
On Thu, Jan 12, 2006 at 01:37:45PM +0100, St_Germain@web.de wrote:
> I have a database-dbunit-query to get some kinds of webresults with dbunit from our oracle-database.
> So the dbunit is a kind like xml:
>
> output from dbunit:
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
> <FOO COL1="22901862" COL2="010100000084" COL3="0" COL4="RI" COL5="NP" COL6="z" COL7="03.10.2006"/>
> </dataset>
>
> How can I use these kinds of statements to get it through webtest like:
>
> invoke ...
> [...]
> <clickLink label="${COL1}"/>
> <setInputField name="number1" value="${COL2}" .../>
> <clickButton .../>
> [..]
>
> and so on?
>
> How do I define it in ant/webtest as property-file or do I have to include it?
You could use xslt to generate a xml file usable with ants XmlProperty
task?(Or just a plain properties file)
Another way could be to use <invoke/> on the dbunit xml file and then use
<storeXPath/> to extract the value.
greetings,
lothar