Do I have to login/logout every time on my tests?

How to apply eValid to functional testing of web applications.

Do I have to login/logout every time on my tests?

Postby epanel » Thu Sep 23, 2010 2:44 pm

Do I have to login/logout every time on my tests? Is there a way to log in just once and then, while staying logged in, to run additional tests?
epanel
 
Posts: 5
Joined: Mon May 03, 2010 3:48 pm

Re: Do I have to login/logout every time on my tests?

Postby eValid » Tue Sep 28, 2010 12:45 pm

epanel wrote:Do I have to login/logout every time on my tests? Is there a way to log in just once and then, while staying logged in, to run additional tests?

The answer depends on what kind of web application you are testing.

Some applications will keep cookies to remember that you logged in, and in that case if you are using DeleteCookies then you will have to log in again.

Other types of applications keep the login data internal to the browser -- there are sometimes called "session cookies" -- and once you are logged in you stay logged in so long as that browser session is active.

In this case you may just as well log in once, then do all of your tests, and then log out.

An alternative way to do this is to arrange a new "test driver page" that invokes your login page as a separate window. Then your test script can start on you special test driver page by clicking on the login page, which opens in a new window, and you can then close that window at the end of your test to erase the context.

The eValid Team
eValid
 
Posts: 2395
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons