Cookie are text files that gets saved by a web site through your browser on your disk which can be retrieved by the web site that saved them. Cookies are used in a lot of web applications. They are commonly used for remembering your email and password, but allow all sorts of more complex interactions and features.
Cookies are fundamental to the functioning of many of the web’s more complex and interesting sites, but they can also introduce security risks. It is important to test your site’s cookies for both of these reasons.
How to Test Cookies?
Testing cookies is a common task for a software tester as they are essential to many web applications which include informative content and payment transactions.
Below are the steps which should be considered while doing testing:
- Disabling Cookies: An important part of cookie testing involves disabling cookies on your browser. You need to make sure that cookies are disabled and then access the website checking that the pages that are working properly. Browse the whole website and watch for crashes or other roadblocks. Check that the site has either implemented workarounds for browsers with cookies disabled or that the user is informed that cookies are required to use the site.
- Corrupting Cookies: Another testing that should be performed is corrupting the cookies. To corrupt the cookies, you find the location of the site’s cookie on your local machine and manually edit it with fake and invalid data. Corrupted cookies can be used access internal information from the domain which can then be used to hack the site. If you are testing banking or financial sites, then testing corrupted cookies should be a priority.
- Removing Cookies: Remove all the cookies for the website you are testing and check website still works properly.
- Cross-Browser Compatibility: You should also check that cookies are being written properly on all supported browsers from any page that writes cookies.
Throughout testing, you should always check that a proper error message is displayed.
Cookie testing is really important for the functioning and security of any web application and it should be a part of any web testing plan.