Hi Mario, take a look at the "config -> defaultpropertytype" section in the manual. http://webtest.canoo.com/webtest/manual/config.html
Specifically it says: "[...] default is "dynamic" [...] If set to "dynamic", webtest dynamic properties are used. [...] If using ant properties to store webtest properties, the values of properties persist across <webtest> tasks but you run the risk of name clashes with other tasks using ant properties. " Unless you've explicitely changed this in your configuration, I don't think you can expect properties to survive to the next webtest. When changing this, note that you're implicitely using "Step.getWebtestProperties()", which calls Step.getWebtestProperties(null). The argument indicates the type of properties to access, and null here means the default. When you change the default property type in the configuration, I'd check if you can still read the "dynamic" ones. Not too sure about all this though. :) Regards Murat 2010/10/27 Mario Somrei <[email protected]>: > Hi folks, > > I have a bunch of webtests that are testing a webshop and I want to store a > value (a special number that is dynamically created every time I create an > order) in an ant property, to use it in another webtest. Both webtests are > later called in the same "allTests.xml and are accessing the same properties > file." The way I do it is like this: > > > First I try to store the property by the name "orderCodeGlobal" in the first > webtest. The assigned value to that property is a dynamic property called > "orderCode". After that I try to access the global-property by calling > ${orderCodeGlobal} in teh second webtest. But instead of the number I expect > I always get "${orderCodeGlobal}" as input value for my input filed. For > better comprehension see the example below. > > What am I doing wrong? > > Cheers > Mario > > > WEBTEST 1 > > <!DOCTYPE project SYSTEM "../../dtd/Project.dtd"> > > <project default="test"> > > <target name="test"> > <webtest name="create order"> > > [...] > > <storeXPath > xPath="//*...@id='order_code']" property="orderCode" > description="store order code" > /> > <groovy description="get order code from string"> > def length = step.webtestProperties.orderCode.size() -1 > step.webtestProperties.orderCode = > "$step.webtestProperties.orderCode"[16..length] > </groovy> > <storeProperty > description="attempt to store value in ant variable" > name="orderCodeGlobal" > propertyType="ant" > value="#{orderCode}" > /> > > [...] > </webtest> > </target> > </project> > > WEBTEST 2 > > <project default="test"> > > <target name="test"> > <webtest name="test order"> > > [...] > > <setInputField description="set order code" > htmlId="login" value="${orderCodeGlobal}" > /> > > [...] > </webtest> > </target> > </project> > -- > Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! > Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

