Hi,
<<but what about something like:>>
old functionality works but i want use NEW FEATURE (then/else): to set
condition in one place only
WEBTEST TRUE
<webtest name="test">
&config;
<storeProperty name="Tested" value="true" />
<ifStep test="${Tested}" >
<then>
<echo> "THEN" </echo>
</then>
<else>
<echo> "ELSE" </echo>
</else>
</ifStep>
</webtest>
Result - correct:
Test results for: test
Expand/Collapse nested steps:
#Result Name Parameter Duration
1 storeProperty
name Tested
value true
=> value true
2
ifStep
test true
#Result Name Parameter Duration
1
then
#Result Name Parameter Duration
1 echo
nested text"THEN"
2
else
#Result Name Parameter Duration
1 echo
nested text"ELSE"
WEBTEST FALSE
<webtest name="test">
&config;
<storeProperty name="Tested" value="false" />
<ifStep test="${Tested}" >
<then>
<echo> "THEN" </echo>
</then>
<else>
<echo> "ELSE" </echo>
</else>
</ifStep>
</webtest>
Result - WRONG:
Test results for: test
Expand/Collapse nested steps:
#Result Name Parameter Duration
1 storeProperty
name Tested
value false
=> value false
2
ifStep
test false
#Result Name Parameter Duration
else
#Result Name Parameter Duration
1 echo
nested text"ELSE"
2
else
#Result Name Parameter Duration
1echo
nested text"ELSE"
Any comments?
Regards,
Roman
John and Pip wrote:
Hi,
That looks pretty weird to me and I don't understand what you mean by
"report is generated" and I don't understand what your code is even
trying to do.
but what about something like:
<storeProperty name="Tested" value="true" />
<ifStep test="${Tested}" >
<clickLink label="Test1" />
</ifStep>
<ifStep unless="${Tested}" >
<clickLink label="Test2" />
</ifStep>
regards,
John
On Tue, Mar 4, 2008 at 12:15 AM, Parkin Roman
<[EMAIL PROTECTED]> wrote:
Hi,
I take R_1678 build and try to usenew feature <then>/<else> in <ifStep>
It works correctly but report is generated wrong in my opinion.
When <else> step is executed, then <else> is displayed twice and no
<then> step in result
Webtest code:
...
<storeProperty name="Tested" value="true" />
<ifStep test="${Tested}" >
<then>
<clickLink label="Test1" />
</then>
<else>
<clickLink label="Test2" />
</else>
</ifStep>
<ifStep unless="${Tested}" >
<then>
<clickLink label="Test1" />
</then>
<else>
<clickLink label="Test2" />
</else>
</ifStep>
...
Report is generated:
if Step test=true
then
else
ifStep unless=true
else
else
Is it correct?
Regards,
Roman Parkin
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest