Cookie Testing

Cookie Testing: What and How to Test

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.
  • Editing Cookies: If you are testing an application which uses cookies to store login information then you should try changing the user in the cookie or address bar to another valid user. Editing the cookie should not let you log in to a different user’s account.

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.

The post Cookie Testing: What and How to Test appeared first on OptimusQA.