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

Chapter 12 Testing

Passing Thoughts

I end this snapshot testing section with the statement that it is not for everyone. Some people really like the reduction in test case size, while it verifies more than most typical unit tests by the sheer fact that it

verifies the whole object under test. As a counter argument, some people dislike that the expected state or golden master is in a file separate to the tests. I personally believe they provide great value, and I hope that this introduction to snapshot testing will give you enough context to decide whether it is going to be a good fit for you and your team, or at least give you the desire to experiment with the concept.

Looking totheFuture

I really wished this chapter could cover how to write and build tests that can test your UI via automation tests. Sadly, this is not quite ready yet. It is certainly something that is being looked at, but there is nothing concrete or ready.

If you are coming in with a background in Xamarin.Forms, you may well be aware of Xamarin.UITesting. This proved to be a little difficult to work with and it was inconsistent at times, but it did provide the

groundwork for writing automation tests for a Xamarin.Forms application. Currently the .NET MAUI team is evaluating a number of options to enable you to test your applications.

There is currently the ability to test through the use of Appium (https://appium.io); however, it can be clunky and unreliable at times. I am most excited by the work that Jonathan Dick (the .NET MAUI

lead) is doing with Maui.UITesting. This is very much in its infancy at the time of writing but I am expecting good things to come from it. You should check out the details over on the GitHub repository at https://github. com/Redth/Maui.UITesting.

390