[Webtest] Is there a way to use the result of the test step to control the subsequent testing?

Ji Kim webtest@lists.canoo.com
Fri, 23 Jul 2004 14:27:37 -0700


I'm pretty sure that <iF> already treats the property value of 0 as
false greater than 0 as true.  If not, you can always test for it in the
XPATH expression and if the condition is true, the property will have
the value "true".=20

Example: xpath=3D"count(//a[text()=3D"next page"])" or
xpath=3D"count(//a[text()=3D"next page"]) > 0). In the first case, it =
would
be set to number of finds and the second case it would be true or false.


-----Original Message-----
From: webtest-admin@gate2.canoo.com
[mailto:webtest-admin@gate2.canoo.com] On Behalf Of Tize Ma
Sent: Friday, July 23, 2004 2:04 PM
To: webtest@gate2.canoo.com
Subject: RE: [Webtest] Is there a way to use the result of the test step
to control the subsequent testing?

Thanks, Ji.
I don't have to use verifyXXX. Your solution looks good to me. However,
as I understand, <iF> only takes true or false for its if property. How
can I take a property (either from storexpath or other means), and
"convert" it to true or false?
Tize

-----Original Message-----
From: Ji Kim [mailto:Ji.Kim@cnet.com]
Sent: Friday, July 23, 2004 4:37 PM
To: webtest@gate2.canoo.com
Subject: RE: [Webtest] Is there a way to use the result of the test step
to control the subsequent testing?


I am doing something similar. I use <storexpath xpath=3D"count(...)"...>
to test the condition and use the saved value of property used in
<storexpath> in the <iF>. You can "save" dynamic properties using
<exportproperty>. (From what I tried, <iF> doesn't work with dynamic
property or embeded <verifyxxx>. If you know that <iF> should accept
<verifyxxx> as test, please let me know.)  =20

If you use <verifytext> then I think you have to do something
conditional in Ant build file since the test that contains the
<verifytext> will fail.=20

If there's some other way that's simpler, I would like to know.

-----Original Message-----
From: webtest-admin@gate2.canoo.com
[mailto:webtest-admin@gate2.canoo.com] On Behalf Of Tize Ma
Sent: Friday, July 23, 2004 12:57 PM
To: webtest@gate2.canoo.com
Subject: [Webtest] Is there a way to use the result of the test step to
control the subsequent testing?

Hi, everyone,
   Did anyone use the result of test step to control/determine test
afterwards? For example, after verify a text, if it is a success, do A,
otherwise do B. What I can think of is (1) save the "state" of the
result to a dynamic property (possible?); (2) "convert" the property to
true or false, and save to another property (possible?); (3) use the IF
step patch posted a few months ago to do the rest. Is this a feasible
approach? Thanks.
Tize
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest