[Webtest] properties

Brian Spindler webtest@lists.canoo.com
Thu, 4 May 2006 08:12:48 -0400


I am using storeRegEx to store a dynamic property, this works =
successfully however when I try to use the property in an xslt statement =
it does not evaluate, here is the canoo code:

<webtest name=3D"extract_build">
	&config;
	<steps>
		&login;
		<storeRegEx
				description=3D"Extract build number"
				text=3D".*?\(Build (\d+)\).*?"
				group=3D"1"
				property=3D"buildnum"
		/>
		<verifyText text=3D"#{buildnum}"/>
		<xslt=20
		in=3D"webtest-results/results_${sfx}.xml"=20
		out=3D"csv_dumps/${TestSet}!_#{buildnum}.csv"
		style=3D"csv_dumps/results_csv.xsl"
		force=3D"true"/>
	</steps>
=09
</webtest>

Log indicates success:

[storeRegEx]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: =
storeRegEx "Extract build number" (5/7)
[storeRegEx]  INFO (com.canoo.webtest.steps.store.StoreRegExMatch) - =
Setting dynamic property <buildnum> to <18289>

But when the xslt out file is written it comes out with =
UI_Prefs!#{buildnum}.csv instead of UI_Prefs!18289.csv

The logs after setting property:

[verifyText]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: =
verifyText (6/7)
     [null]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null =
(7/7)
     [null]  INFO (com.canoo.webtest.steps.Step) - =
WrappedSteps.attributes not found.
     [xslt] Processing =
/home/user/Desktop/canoo/webtest-results/results_test.xml to =
/home/user/Desktop/canoo/csv_dumps/UI_Prefs!${buildnum}.csv
     [xslt] Loading stylesheet =
/home/user/Desktop/canoo/csv_dumps/results_csv.xsl
 INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully =
created.

Any thoughts?

Thanks!