Use Mock's with Automation Testing

Автор: literator от 12-07-2021, 14:21, Коментариев: 0

Категория: КНИГИ » ПРОГРАММИРОВАНИЕ

Use Mock's with Automation TestingНазвание: Use Mock's with Automation Testing
Автор: Anton Smirnov
Издательство: Leanpub
Год: 2021-05-24
Страниц: 82
Язык: английский
Формат: pdf (true), epub
Размер: 34.6 MB

In this book, I have considered options with practical applications. This book also provides many examples of programming languages for further use in projects. When testing programs that have multiple dependencies, you can either create instances of these dependencies or use dummy objects to simulate the expected behavior of the dependencies. Although recent quantitative studies have shown that layouts are widely used in both open source and proprietary projects, scientific knowledge about how and why practitioners use layouts is still lacking. To this end, we will explore the use of mock objects in this book. Let's look at the most popular frameworks and their implementations.

There is a category of classes that are very easy to test. If a class depends only on primitive data types and has no relations with other business entities, then it is enough to create an instance of this class, "kick" it in some way by changing a property or calling a method and check the expected state.

This is the simplest and most effective way of testing, and any sensible design starts from such classes, which are the "building blocks" of the lower level, on the basis of which more complex abstractions are then built. But the number of classes that live in such "isolation" is not much by nature. Even if we normally isolated all the logic for working with the database (or service) into a separate class (or set of classes), sooner or later someone will appear who will use these classes to get higher-level behavior and this "someone" will also need to be tested. Probably everyone who started writing unit and integration tests, faced with the problem of abuse of mocs, which leads to fragile tests. The latter, in turn, creates the wrong belief in the tester that the tests only interfere with the work. Pretty often you can see test automation framework successfully running tests and reporting results but not doing what it’s supposed to do: providing a reliable way for team members to build automated tests, and get reliable results. This often happens when a test automation framework is built without planning in advance and understanding how it will be used.

We can safely say that this book is a kind of guide for beginners in the field of automation software testing. I have a huge knowledge of the field of test automation. I also have quite a lot of experience building automation on a project from scratch. I have repeatedly had to develop and implement the framework of testing automation on projects. The learning approach focuses on a huge chunk of theory on building the automation testing framework. The book also discusses the theory of test automation in detail.

Скачать Use Mock's with Automation Testing








Нашел ошибку? Есть жалоба? Жми!
Пожаловаться администрации
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.