Book Image

Selenium Design Patterns and Best Practices

By : Dima Kovalenko
Book Image

Selenium Design Patterns and Best Practices

By: Dima Kovalenko

Overview of this book

Table of Contents (18 chapters)
Selenium Design Patterns and Best Practices
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Testing the product review functionality


Our website, like many other modern websites, allows users to leave positive and negative feedback on a given product. Higher-rated comments on any given product can provide a much needed boost in sales. As with any situation involving monetary incentives, someone will try to game the system and make money in the process. So, aside from the ability to leave a comment, our website has a rudimentary fraud prevention system. It will prevent any suspiciously duplicate comments/ratings from being added to any product.

It is now our task to test both of these features. So, let's explicitly state the target goals of the tests we will now implement:

  • As a website user, I should be able to leave a product review for any product, and the resulting review should be immediately visible on the product's page

  • As a fraudulent user, I should be prevented from posting duplicate product reviews on our website

Starting a product review test

Let's start off by making a new...