[Webtest] iF statement patch
Tue, 3 Aug 2004 11:43:55 -0700
I don't know if it's in the latest. (My guess is no but easy enough to
find out. src/com/canoo/extension/Ifstep.java. In some ways, I do agree
that conditional testing is not a good idea. But in reality, at least
for me, this has some use.) But I went through the same not finding the
examples. So, here it is.=20
The ant property var1 is set to true. (in property file: var1=3Dtrue or
<property name=3D"var1" value=3D"true"/> in the build file.)
stepid=3D"test ant property condition"
stepid=3D"inside the 1st test condition"
text=3D"some conditional test text string or reg ex"
The dynamic property var2 is set to true. (e.g. <storexpath
xpath=3D"count(//a) > 0" property=3Dvar2/>)
stepid=3D"test dynamic property condition"
stepid=3D"inside the 2nd test condition"
Like <repeat>, you can have multiple steps between <iF> and </iF>.
[mailto:email@example.com] On Behalf Of firstname.lastname@example.org
Sent: Tuesday, August 03, 2004 10:40 AM
Subject: [Webtest] iF statement patch
Is this patch integrated in the build now, or is it still only available
as a patch?
And is there an example anywhere of what the 'iF' looks like in the
actual WebTest script? Jeannie said there was an example in her
posting, but I couldn't find it (doesn't mean it wasn't there, I might
just not get it).
--- Jeannie Graham <Jgraham@arrowheadgrp.com> wrote:
> It looks like my stupid email blocker won't let me send zip files, so=20
> I am only sending the actual files (cuz they're small) but I can't=20
> send the html
> syntax file. The iF statment has to look like this
> in your scripts, "iF" -
> small i, capital F.
> -----Original Message-----
> From: Jeannie Graham
> Sent: Wednesday, May 05, 2004 9:55 AM
> To: 'email@example.com'
> Subject: [Webtest] If statement patch
> Hello everyone,
> Well, here it is! I finally got the IF statement
> patch that Aatish
> sent to work (endless thanks to Aatish for making it
> possible!). First, I
> had to make some tweaks to the files that Aatish sent me, IfStep.java=20
> IfWrapper.java. I also had to tweak
> Now, to add the patch and compile Canoo Webtest:
> 1). Put both IfStep.java and IfWrapper.java into the WEBTESTHOME,=20
> extension directory.
> 2). Update your TestStepSequence.java file, which is in the=20
> ant directory. =20
> 3). Update your webtestTaskdefs.props file, which is in the=20
> WEBTESTHOME directory, with "iF=3Dcom.canoo.webtest.extension.IfStep".
> 4). Build the build file to compile the changes, C:\WEBTESTHOME>ant.
> 5). Copy the new webtest.jar file in the deployment/lib directory to=20
> the main lib directory.
> And now, you should be able to do an iF statement. =20
> I am also including the
> html file that Aatish sent me, showing the syntax of the iF statement.
> Hope everyone enjoys,
WebTest mailing list