Это видео недоступно.
Сожалеем об этом.

How to write good Unit Tests for iOS Apps in SwiftUI (2022)

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • Today we’re going to be looking at how we can create unit tests in SwiftUI. We will also be looking at why unit testing is important, and how it can help us in preventing future errors in our code.
    00:00 Intro
    00:58 Getting started
    02:55 Converters
    05:25 ViewModel
    06:23 Unit Testing Target
    07:50 Your first test
    11:51 More tests
    14:33 SetUp & TeardDown
    16:58 Even more tests
    19:53 Code coverage
    22:23 Finishing our app
    26:00 Summing it up

Комментарии • 13

  • @nadyarozhina3311
    @nadyarozhina3311 2 года назад +2

    Thank you! This is clearest description I have seen

  • @Anya1272
    @Anya1272 Год назад +2

    Such an amazing explanation! Thank you so much!

  • @albertlu8407
    @albertlu8407 2 года назад +1

    Fantastic work!

  • @gastongasquet3594
    @gastongasquet3594 Год назад +1

    Great video and better explanation. Subscribed.

  • @Marvel2002
    @Marvel2002 2 года назад +1

    very insightful sir thx

  • @ThyagoRaphael
    @ThyagoRaphael Год назад

    Thanks a million!

  • @mochamadnurkhayalkadafi1596
    @mochamadnurkhayalkadafi1596 Год назад

    Amazing explanation👍👍

  • @bryceellis112
    @bryceellis112 Год назад

    Very interesting video!

  • @tbg6nb
    @tbg6nb Год назад

    very nice and concise ! speaking about comparing the error messages at 13:13 I think it would be better to throw errors or have an enum with a raw type String which defines these messages

  • @shafferzeyn9710
    @shafferzeyn9710 2 года назад

    you are perfect

  • @xfabiosoft
    @xfabiosoft Месяц назад

    Very good on begging unit test, but nothing related to SwiftUI.

  • @nurirfanpangestu3696
    @nurirfanpangestu3696 2 года назад

    great

  • @dhaneshshastri1
    @dhaneshshastri1 Год назад

    Follow BDD (Behaviour Driven Development). With which we can cover all the interrelated dependencies for a particular flow also, the Views methods (not the actual UITests) are also covered under this. So ultimately we achieve close to more than 90% test coverage minimum. When I say BDD I actually mean business use cases for any SUT rather than individual methods. If we cover all the use cases all the methods (even private) will be covered. If any method is not covered, then we can safely remove this method as its not at all reachable and its unused.