[Webtest] Isolating login and logout

Lisa Crispin Lisa Crispin" <lisa.crispin@gmail.com
Fri, 17 Oct 2008 18:07:27 -0600


------=_Part_47954_29592096.1224288447482
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I guess I don't understand your question. It sounds like you're doing what
I'm doing. Are you saying you are including a module and it's executing, but
for some reason, the next thing in your script behaves as if the login
wasn't done?
-- Lisa

On Fri, Oct 17, 2008 at 5:44 PM, av8r <harman.birdi@gmail.com> wrote:

>
>
> Lisa,
>
> I do have the loginAndStep in my includes/ directory, which I am including
> in the tests as &loginAndStep;
>
> However, this is being done in every tests. Are you doing it at the module
> level. Would you be able to put a sample up?
>
> Thanks,
> --H
>
>
> Lisa Crispin-2 wrote:
> >
> > We do this by putting the login (same for logout) into a module, and
> > include
> > it into the scripts with !ENTITY, eg.
> > <!ENTITY loginPlanAdmin  SYSTEM "file:../modules/loginPlanAdmin.xml">
> >
> > then where we want to invoke this we use:
> > &loginPlanAdmin;
> >
> > This is pretty old-school, I think there's a newer and better way. But we
> > use 'modules' for all code that is used in more than one script, for ease
> > of
> > maintenance.
> > -- Lisa
> >
> > On Fri, Oct 17, 2008 at 5:07 PM, av8r <harman.birdi@gmail.com> 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
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Isolating-login-and-logout-tp20042365p20042365.html
> >> Sent from the WebTest mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> WebTest mailing list
> >> WebTest@lists.canoo.com
> >> http://lists.canoo.com/mailman/listinfo/webtest
> >>
> >
> >
> >
> > --
> > Lisa Crispin
> > Co-author with Janet Gregory, _Agile Testing: A Practical Guide for
> > Testers
> > and Agile Teams_ (Addison-Wesley 2009)
> > http://www.agiletester.ca
> > http://lisa.crispin.home.att.net
> > http://lisacrispin.blogspot.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Isolating-login-and-logout-tp20042365p20042650.html
> Sent from the WebTest mailing list archive at Nabble.com.
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
http://www.agiletester.ca
http://lisa.crispin.home.att.net
http://lisacrispin.blogspot.com

------=_Part_47954_29592096.1224288447482
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">I guess I don&#39;t understand your question. It sounds like you&#39;re doing what I&#39;m doing. Are you saying you are including a module and it&#39;s executing, but for some reason, the next thing in your script behaves as if the login wasn&#39;t done?<br>
-- Lisa<br><br><div class="gmail_quote">On Fri, Oct 17, 2008 at 5:44 PM, av8r <span dir="ltr">&lt;<a href="mailto:harman.birdi@gmail.com">harman.birdi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Lisa,<br>
<br>
I do have the loginAndStep in my includes/ directory, which I am including<br>
in the tests as &amp;loginAndStep;<br>
<br>
However, this is being done in every tests. Are you doing it at the module<br>
level. Would you be able to put a sample up?<br>
<br>
Thanks,<br>
--H<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
Lisa Crispin-2 wrote:<br>
&gt;<br>
&gt; We do this by putting the login (same for logout) into a module, and<br>
&gt; include<br>
&gt; it into the scripts with !ENTITY, eg.<br>
&gt; &lt;!ENTITY loginPlanAdmin &nbsp;SYSTEM &quot;file:../modules/loginPlanAdmin.xml&quot;&gt;<br>
&gt;<br>
&gt; then where we want to invoke this we use:<br>
&gt; &amp;loginPlanAdmin;<br>
&gt;<br>
&gt; This is pretty old-school, I think there&#39;s a newer and better way. But we<br>
&gt; use &#39;modules&#39; for all code that is used in more than one script, for ease<br>
&gt; of<br>
&gt; maintenance.<br>
&gt; -- Lisa<br>
&gt;<br>
&gt; On Fri, Oct 17, 2008 at 5:07 PM, av8r &lt;<a href="mailto:harman.birdi@gmail.com">harman.birdi@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Currently the way I have my tests written, each one has to invoke the<br>
&gt;&gt; url to login screen at the beginning of the test, and logout when the<br>
&gt;&gt; test has finished?<br>
&gt;&gt;<br>
&gt;&gt; I have tried to isolate the login and logout to separate tests, but it<br>
&gt;&gt; does not work. There is no session maintained after I move from the login<br>
&gt;&gt; test to the actual functional test.<br>
&gt;&gt;<br>
&gt;&gt; Is there anyway to maintain the session, so I can eliminate the overhead<br>
&gt;&gt; of logging in and logging out for each test.<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; --H<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://www.nabble.com/Isolating-login-and-logout-tp20042365p20042365.html" target="_blank">http://www.nabble.com/Isolating-login-and-logout-tp20042365p20042365.html</a><br>
&gt;&gt; Sent from the WebTest mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; WebTest mailing list<br>
&gt;&gt; <a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br>
&gt;&gt; <a href="http://lists.canoo.com/mailman/listinfo/webtest" target="_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Lisa Crispin<br>
&gt; Co-author with Janet Gregory, _Agile Testing: A Practical Guide for<br>
&gt; Testers<br>
&gt; and Agile Teams_ (Addison-Wesley 2009)<br>
&gt; <a href="http://www.agiletester.ca" target="_blank">http://www.agiletester.ca</a><br>
&gt; <a href="http://lisa.crispin.home.att.net" target="_blank">http://lisa.crispin.home.att.net</a><br>
&gt; <a href="http://lisacrispin.blogspot.com" target="_blank">http://lisacrispin.blogspot.com</a><br>
&gt;<br>
&gt;<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Isolating-login-and-logout-tp20042365p20042650.html" target="_blank">http://www.nabble.com/Isolating-login-and-logout-tp20042365p20042650.html</a><br>
</font><div><div></div><div class="Wj3C7c">Sent from the WebTest mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
WebTest mailing list<br>
<a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br>
<a href="http://lists.canoo.com/mailman/listinfo/webtest" target="_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lisa Crispin<br>Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009)<br><a href="http://www.agiletester.ca">http://www.agiletester.ca</a><br>
<a href="http://lisa.crispin.home.att.net">http://lisa.crispin.home.att.net</a><br><a href="http://lisacrispin.blogspot.com">http://lisacrispin.blogspot.com</a><br>
</div>

------=_Part_47954_29592096.1224288447482--