[Webtest] stupid webtest question #426. Can I store a constant for later us e?

Dierk Koenig webtest@lists.canoo.com
Fri, 26 Sep 2003 10:13:14 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C38416.CC2416D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

stupid webtest question #426. Can I store a constant for later use?yes, you
can.
In our current project we have the very same issue.
You need to find an xpath expression that evaluates to your 'constant', eg.
xpath="concat(''MYCONSTANT,'')"

I agree that a "setProperty" step would be much nicer :-)
Any volunteer to write a custom step for this?

cheers
Mittie

  -----Original Message-----
  From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Bill Milbratz
  Sent: Donnerstag, 25. September 2003 18:55
  To: 'webtest@lists.canoo.com'
  Subject: [Webtest] stupid webtest question #426. Can I store a constant
for later us e?


  Hi,

  Can I store a constant using storeregex?

  I'd like to reuse a module in different use cases, but with different
parameter values.

  I was thinking of storing a 'permanent' property (e.g. ${code.foo.value})
in a dynamic property and using that dynamic property in the module..

  example:

  before calling the module:
  <storeregex
         stepid="store code value foo"
         text="${code.foo.value}"
        property="code.value" />

  excerpt from the module:
   <setselectfield stepid="setSelectField"
      name="propertyValue"
      value="#{code.value}"
   />



  The documentation suggests that I storeregex/storexpath only works on the
last response.




  thanks,

  bill milbratz



------=_NextPart_000_000F_01C38416.CC2416D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>stupid webtest question #426. Can I store a constant =
for later use?</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =
size=3D2>yes,=20
you can.</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =
size=3D2>In our=20
current project we have the very same issue.</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =
size=3D2>You=20
need to find an xpath expression that evaluates to your 'constant', eg.=20
xpath=3D"concat(''MYCONSTANT,'')"</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =
size=3D2>I=20
agree that a "setProperty" step would be much nicer =
:-)</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =
size=3D2>Any=20
volunteer to write a custom step for this?</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =

size=3D2>cheers</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =

size=3D2>Mittie</FONT></SPAN></DIV>
<DIV><SPAN class=3D383080908-26092003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com]<B>On=20
  Behalf Of </B>Bill Milbratz<BR><B>Sent:</B> Donnerstag, 25. September =
2003=20
  18:55<BR><B>To:</B> 'webtest@lists.canoo.com'<BR><B>Subject:</B> =
[Webtest]=20
  stupid webtest question #426. Can I store a constant for later us=20
  e?<BR><BR></FONT></DIV>
  <P><FONT size=3D2>Hi,</FONT> </P>
  <P><FONT size=3D2>Can I store a constant using storeregex? </FONT></P>
  <P><FONT size=3D2>I'd like to reuse a module in different use cases, =
but with=20
  different parameter values.</FONT> </P>
  <P><FONT size=3D2>I was thinking of storing a 'permanent' property =
(e.g.=20
  ${code.foo.value}) in a dynamic property and using that dynamic =
property in=20
  the module..</FONT></P>
  <P><FONT size=3D2>example:</FONT> </P>
  <P><FONT size=3D2>before calling the module:</FONT> <BR><FONT=20
  size=3D2>&lt;storeregex</FONT> <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stepid=3D"store code =
value=20
  foo"</FONT> <BR><FONT size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  text=3D"${code.foo.value}"</FONT> <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; property=3D"code.value" =
/&gt;</FONT> </P>
  <P><FONT size=3D2>excerpt from the module:</FONT> <BR><FONT=20
  size=3D2>&nbsp;&lt;setselectfield stepid=3D"setSelectField"</FONT> =
<BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp; name=3D"propertyValue"</FONT> <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp; value=3D"#{code.value}"</FONT> <BR><FONT=20
  size=3D2>&nbsp;/&gt;</FONT> </P><BR>
  <P><FONT size=3D2>The documentation suggests that I =
storeregex/storexpath only=20
  works on the last response. </FONT></P><BR><BR>
  <P><FONT size=3D2>thanks,</FONT> </P>
  <P><FONT size=3D2>bill milbratz</FONT> =
</P><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000F_01C38416.CC2416D0--