2. What is Cookie
•A cookie is some small information stored in a text
file on the user’s hard drive by a web server
•Later used by the web browser to retrieve
information from that machine
•Instructions for reading and writing cookies are
coded by website authors and executed by user
browsers
3. Why are Cookies
used
•Cookies are nothing but the user’s identity and
used to track where the user has navigated
throughout the web site pages
•The communication between the web browser
and the web server is stateless
4. Applications where
cookies can be used
•To implement a shopping cart
•Personalized sites
•User tracking
•Marketing
•User sessions
5. How to test
cookies
•Disabling Cookies
1. This is probably the easiest area of cookie testing
2. Disable all cookies and attempt to use the site’s
major features and functions
3. With cookies disabled, our testing job is
somewhat reduced
6. Continued…
•Selectively Rejecting Cookies
1. Start by deleting all cookies from our PC
2. Analyze site cookie usage in advance and draw up
a test plan
3. Detailing what cookies to reject/accept for each
function
7. Continued…
•Corrupting Cookies
1. Altering the data in the persistent cookies
2. Allow the cookie to be modified
3. Selectively deleting cookies
8. Continued…
•Cookies Encryption
1. By using encryption of the cookie data
2. Sensitive information like usernames and
passwords should be encrypted before it is sent to
our computer
3. A case can certainly be made that certain types of
sensitive data – credit card numbers
9. Test Cases For Cookie
Testing
•Check if the application is writing cookies properly
or not
•Test to make sure that no personal or sensitive data is
stored in the cookie. If it is there in cookies, it should
be in encrypted format
•If the application under test is a public website, there
should not be overuse of cookies
10. Continued…
•Close all browsers, delete all previously written
cookies and disable the cookies from our browser
settings
•Set browser options to prompt whenever cookie is
being stored / saved in your system
•Close all browsers windows and manually delete all
cookies
11. Continued…
•Edit few cookies manually in notepad or some other
editor
•Cookies written by one web site should not be
accessible by other website
•If we are testing an online shopping portal, Check if
reaching to our final order summary page deletes the
cookie of previous page of shopping cart properly
12. Conclusion
•Cookies shouldn't be put in the same category as the
viruses, spam, or spyware
•They are the tools to help us and manage our time
more efficiently on the web
•Testing should be done properly to check that
website is working with different cookie setting