Test Cookies

How will you test cookies in web testing?

Questions by rajupluto

Showing Answers 1 - 15 of 15 Answers

Its clearly depends up on the Requirement. Cookies is the file where the user informations are stored up on suitable time limit. To Test cookies ensure that

1.) Login Details are remembered at the next login (userid & pwd field should be pre-pouplate up on request at first login)

2.) Depends up on the user(s) information should stored.

3.) Check the Cookies(Sesion Identification) expiry time and should be noticed on execution.

4.) Check the Cookies session end once the IP address is changed or to change.

5.) Never the same Cookie session will not be work on different IP address

  Was this answer useful?  Yes

singha31

  • Aug 7th, 2009
 

First of all what is the exact purpose for checking the cookie.

Some reasons for testing Cookie:

1. For traceability
2. For Security reason

Generated cookies are available in the path C:Documents and Settings <System User>Local Settings ...
for clarity first delete the old temp files and start from beginning.
sometimes Cookies are displayed in the URL like "jsession ID: <12345678>"  you can change and check the customized cookie is working or not for a specific user.

If you post your specific requirement I can give you better response.

  Was this answer useful?  Yes

yogeshv

  • Sep 8th, 2009
 

Testing the cookies is also for traceability where that wont be the primary reason as the security stands first.

  Was this answer useful?  Yes

AjitaA

  • Oct 23rd, 2009
 

Some Major Test cases for web application cookie testing:

The first obvious test case is to test if your application is writing cookies properly on disk.

Test cases: 

1) As a Cookie privacy policy make sure from your design documents that no personal or sensitive data is stored in the cookie.

2) If you have no option than saving sensitive data in cookie make sure data stored in cookie is stored in encrypted format or there is and expiry time/date included

3) Make sure that there is no overuse of cookies on your site under test. Overuse of cookies will annoy users if browser is prompting for cookies more often and this could result in loss of site traffic and eventually loss of business.

4) Disable the cookies from your browser settings: See if appropriate messages are displayed to user like “For smooth functioning of this site make sure that cookies are enabled on your browser”. There should not be any page crash due to disabling the cookies.

5) Accepts/Reject some cookies: The best way to check web site functionality is, not to accept all cookies. For executing this test case you can set browser options to prompt whenever cookie is being written to disk. See if pages are getting crashed or data is getting corrupted.

6) Delete cookie: Allow site to write the cookies and then close all browsers and manually delete all cookies for web site under test. Access the web pages and check the behavior of the pages.

7) Corrupt the cookies:  Manually edit the cookie and change the parameters to some vague values. Like alter the cookie content, Name of the cookie or expiry date of the cookie and see the site functionality.

8 ) Checking the deletion of cookies from your web application page: Some times cookie written by domain say rediff.com may be deleted by same domain but by different page under that domain.

9) Cookie Testing on Multiple browsers

10) If your web application is using cookies to maintain the logging state of any user then log in to your web application using some other username and password.  The proper access message should be displayed.

  Was this answer useful?  Yes

TESTING COOKIES

In simple terms, a cookie is information that a web service provider places on a hard drive so it can remember something about its user at a later time.  Several ways to test cookies are:

1) Verify cookie is written to disk
2) Verify no personal information is found in cookies
3) Delete cookies
4) Disable cookies
5) Selectively reject cookies
6) Corrupt cookies
7) Cookie encryption
8) Verify cookies follow proper user accounts

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions