Design Patterns
For High-Quality
Automated Tests
C# Edition
High-Quality Test Attributes
and Best Practices
Anton Angelov
Automate The Planet
Table of Contents
Credits
Copyright @ 2020 Automate The Planet
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the author, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Automate The Planet, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
The author has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, the author cannot guarantee the accuracy of this information.
First published: February 2020
Production reference: Published by Automate The Planet Ltd.
Address: https://www.automatetheplanet.com/
Book cover design and formatting by Martin Kolev
About the Author
Anton Angelov is CTO and Co-founder of Automate The Planet, inventor of BELLATRIX Test Automation Framework, and MEISSA Distributed Test Runner. Anton has 10 years of experience in the field of automated testing. He designs and writes scalable test automation solutions and tools. He consults and trains companies regarding their automated testing efforts. Part of his job is to lead a team of passionate engineers helping companies succeed with their test automation using the company's BELLATRIX tooling. He is most famous for his blogging at Automate The Planet and many given conference talks.
About the Reviewers
Ventsislav Ivanov is a Software Engineer in Tests at Innovative Lab and Automate The Planet. He starts his automation career from his hobby - browser games. For the last 6 years in the IT industry, he has achieved a lot like QA Engineer, Developer, and Lecturer. He has more than 1000 hours like a lecturer in various disciplines - C# Fundamentals, C# OOP, C# Web, Java OOP, High-Quality Code, and of course, Quality Assurance. He is a proud creator and lead of the main Quality Assurance course in one of the best Bulgarian's academies, where more than 1000+ people certified like QA engineers and more than 500+ like automation engineers. He has specialized mainly in web automated testing. He has been responsible for building the entire QA process in his past company, from teaching developers unit testing to designing the whole product Continuous Integration. His motto is: "Instead of feeling embarrassed about your bad code or proud of your good code, you should judge your code by how well it succeeds at achieving your goals."
A few words for the book:
Amazing amount of design patterns and best practices in so little space. I don't know how to describe who this book is for. If you are an experienced automation engineer who wants to improve his/her company's test automation framework, this book is a must-read. If you are a beginner in automation, this book can be an excellent start because of the ladder which you need to climb until reading it.
Nikolay Avramov is currently a Developer in Test at Innovative Lab and Automate The Planet. For the past 8 years, he worked as a Quality Assurance Engineer in Telerik (later acquired by Progress software). He started his career in the field from ground zero- from taking part of the Telerik Academy to becoming a Principal QA Engineer/Ninja that is in the heart of any innovation or automation initiative. Through his work he has developed, and integrated multiple custom frameworks and tools used across the entire company. To name a few- a custom Load and Performance Testing Framework; System Testing Framework; Web Service Testing Framework; Visual Verification Framework; and many other productivity tools that assured the highest quality of all web and business assets of the company. He found his true passion in Automation while looking for a weapon to fight the boring, non-productive daily tasks that a QA faces. By reducing the manual repeatable jobs, he believes that we can make the world a better place, full of happy and productive people that are ready to tackle the next challenging task, instead of the next pile of test scenarios to cover by hand. He is a passionate technology geek and automation specialist that strives to implement optimizations and achieve high-quality standards in any aspect of life.
A few words for the book:
The book will pretty much give you the building blocks you need and will take you through the natural process of building a fully fletched test automation framework within a few hours read. The beginning and the end of the book shows the difference between the rookie QA enthusiast and the automation ninja. This knowledge will give you the power to make educated decisions for common problems in test automation and will give you the right arguments to defend them in front of any manager or developer.
Acknowledgements
The content of the book is a result of the accumulated knowledge of many great engineers and IT professionals. Many good programmers tend to be very egocentric, believing that they are always right and know everything. Often, they forget how they got their knowledge. It is a result not only of our efforts but a mixture of personal effort/work, luck, living, and working environment. I believe that in this phase of my life, I know enough "tips and tricks" so that I can write a book. However, this wouldn't be possible without the help of all the people that took some part of my life. The example and hard work of my parents, high school, and university teachers. Later, the many mentors and colleagues I had in the past companies I worked for. I am a person who is a natural learner and regularly reads new books and watches video courses/lectures. I wouldn't be as good as I am now without the valuable information in these materials.
As some of you know, for the past several years, I am regularly writing articles on my website- Automate The Planet. The book accumulates a big part of the knowledge I tried to share during the years. But the site wouldn't be what it is without your support! So, I would like to say, "Thank You!" to all fans and readers. The same is valid for all the talks I gave to many international DEV and QA conferences. Thank you for being there, hearing and trying to apply the ideas I talk about.
Most importantly, I want to say BIG THANK YOU to my colleagues Nikolay Avramov and Ventsislav Ivanov for agreeing to help me with the technical and editorial tasks. Without their help and support, the quality of the book wouldn't be the same!
My partner in crime at Automate The Planet Martin Kolev is responsible for all visual enhancements, the marketing, and many other tedious tasks around the project.
Thanks to all my friends that were there for me and hearing me talking geek stuff about the book.
Foreword
Since I usually skip the Foreword chapters of other books, I will try to be short. My core belief is that to achieve high-quality test automation that brings value- you need to understand core programming concepts such as SOLID and the usage of design patterns. After you master them, the usual career transition is into more architecture roles, such as choosing the best possible approaches for solving particular test automation challenges. This is the essence of the book. No more Hello world examples but some serious literature about test automation practices!