UI Testing In SwiftUI, How To Write UI Tests In SwiftUI for Our PeopleView

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

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

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

    this 'testing' chapter of this playlist is very tough, but i'm learning sooooooo much because of you. Haven't seen any better, free videos about testing. Thank you so much.

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

      Haha thanks, it is defo more advanced than the other vids. So take your time and rewatch it as many times as needed till you fully grasp the concepts 👌🏾

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

    Hey man, thank you for your work! It's awesome! I see you doing new videos almost every day. My respect! 👍

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

      Glad you enjoy the content 👌🏾

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

    Hello, can you explain how i can i read the iOS simulator or the real device console logs while the UI test execution is in progress just to validate few scenarios based on console logs?

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

    Awesome video as usual 🙌🏾
    I always thought the purpose of integration test or UITest in this case was also to validate the API. So basically write the happy case without mocks and if it fails then something isn’t working as expected therefore helping you catch actual bugs.
    With this setup if there is breaking change from the API the test would still pass right?

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

      Integration tests are meant to validate a real service. UI tests on the other hand validate the UI is correct. In both cases yh, if the API data structure was to change then the test should fail since the decoder wouldn’t be able to decode it 👌🏾

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

    Great use of enums for type-safety. Really paying off in building these tests! Question: I know that we wrote tests for EVERY data element returned from our network call.
    How should I cover enough when dealing with over 500 read-only data elements that are merely processed into strings that represent some derived data? I would think all derived data should be covered by tests and maybe display-only data not tested - but curious as to how you would approach this situation?
    Thanks again for this great content!

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

      Thanks & if you have a large data set you’d probs want to have some local json or a string in your test resources & use equatable to compare both objects to check that they’re the same 👌🏾

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

      @@tundsdev Cool. I can use the same JSON that I used to develop my views in the early going. Makes total sense to check object vs. object rather than every branch in the JSON tree. Thanks for the quick reply sir.

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

      Yh this was a very simple example where the dataset wasn’t too large, in big objects you 1000% want to compare objects since its easier, maintainable & scalable too 👌🏾

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

    Your grid has exact 6 items or at a time 6 items are visible in screen?

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

      I’m testing there are 6 items visible on the screen at that time

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

      My question is, if I have 10 items on that grid where 6 are visible then gridItems.count will return 6. But how to get the count of all 10 cells?? @@tundsdev