Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

CHAPTER 12

Testing

Testing is such an important part of the software development process; it enables you to verify that what you have delivered is what was required and also validate that the software behaves correctly. It also provides the safety net of catching regressions in the products that you build.

There are many different approaches for designing and writing tests and where they fit into the software development process. This chapter is not intended to provide full insight into those approaches, but it will expose you to various methods of testing a .NET MAUI application, why they can be beneficial, and pique your interest in learning to use them in more depth.

Unit Testing

Unit testing is the process of ensuring that small units, typically a method or class, of an application meet their design and behave as intended. One big benefit of testing such a small unit of the code is that it makes it easier for you to identify where issues may lie or creep in as part of regression.

I have worked on many legacy systems throughout my career where the teams neglected to apply unit testing and the experience when trying to identify the cause of a bug in a large system really can be costly in terms of time and money.

Despite unit testing featuring near the end of this book, it is a concept that should be adopted early in the development process. Unit testing can aid in the design and building of code that is easier to read and maintain

© Shaun Lawrence 2023

365

S. Lawrence, Introducing .NET MAUI, https://doi.org/10.1007/978-1-4842-9234-1_12