Hi,
what about following:
<macrodef name="myStandardWebTest">
<attribute name="name" description="the test name">
<element name="myBody" implicit="yes">
<sequential>
<webtest name="@{name}">
&loginSteps;
<myBody/>
&logoutSteps;
</webtest>
<sequential>
</macrodef>
that you can use this way
<myStandardWebTest name="blabla">
... the steps here that should be performed AFTER login
</myStandardWebTest>
Of course if you write your tests with a programming language like
Groovy, you can use a standard programming way.
Cheers,
Marc.
--
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com
av8r wrote:
>
> Hi,
>
> Currently the way I have my tests written, each one has to invoke the
> url to login screen at the beginning of the test, and logout when the
> test has finished?
>
> I have tried to isolate the login and logout to separate tests, but it
> does not work. There is no session maintained after I move from the login
> test to the actual functional test.
>
> Is there anyway to maintain the session, so I can eliminate the overhead
> of logging in and logging out for each test.
>
> Thanks,
> --H
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest