UI Testing Your iOS App (Xcode 13) - 2022

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 44

  • @iOSAcademy
    @iOSAcademy  2 роки тому +2

    Lets connect! linkedin.com/in/afrazsiddiqui

  • @Amrendraroy
    @Amrendraroy Рік тому +1

    can you please prepare a video on UI test with API call?
    For learning purpose this video is too good, but not sufficient for real projects, as API call bind with Views and that point to ViewModel for API call. How we can manage UI test along with server calls.

  • @diariodelooka
    @diariodelooka 2 роки тому +6

    Simple, direct, efficient. Thank you! 🌻

  • @AlexandrNedorezovSanich63
    @AlexandrNedorezovSanich63 2 роки тому

    Have an idea how to test the app with a map? ty

  • @yusufadriansyah8886
    @yusufadriansyah8886 Рік тому

    thank you for the great video.
    I have a question, why my diamond button to run the UI test is missing? so I can't run the test. Suddenly disappear when I write the test code.

    • @illusion4ik
      @illusion4ik 10 місяців тому

      make sure you have the function that starts with lowercase 'test'. Example: testVerifyUsernameExists()

  • @SadSitizen
    @SadSitizen 2 роки тому +5

    Cool video! Could you make a new video about unit testing please?

  • @MathiasVanHoutte
    @MathiasVanHoutte 2 роки тому +4

    Hi, in our company we are using a lot of UI tests but they can be flaky as hell. Any way to improve on this?
    What methods can be used to speed up the UI tests?

    • @stephaniebogart4852
      @stephaniebogart4852 2 роки тому +6

      Automation engineer here - depends on the specific issues you're running into. In my experience, the top recommendations are usually:
      1. Make sure you use intelligent waits (use waitForExistence) for an element to appear before you assert on/interact with it, especially if it's dependent on API calls that can be slow. This impacts reliability and execution speeds, especially if it's just set waits being used.
      2. Test only what you need to test. So for example, skip any UI flow that you don't need where possible. If a test is validating the UI for a feature that is gated behind login, you can create a launch argument that sets the login state before you launch, to reduce potential errors. Again, affects both reliability and execution speeds.
      3. Mock/Stub data where it makes sense (wiremock is a good tool for this). Most of the time the issues I've encountered have been from flaky development backend APIs being slow to respond and causing timeout failures, especially in CI.
      4. Related to 2 - make sure the tests are at the right level (Automation pyramid, if familiar). Only do UI tests when testing the UI, and everything else that can be, should be in the unit/API levels. That said, I do find value in having a few very specific end-to-end happy path tests, but if they can't be made reliable, I'll remove them in favor of a quick manual pass before release.
      Another small way to increase speed is to use Accessibility Identifiers instead of relying on text labels. As I recall, there's three possible ways a given element can be identified and the view hierarchy is scanned from top to bottom for reach - Accessibility IDs are first, then the other two (displayed text as demonstrated in this video and the other I can't remember offhand) are then done if no matching Accessibility IDs are found. This is especially useful if trying to interact with a modal, as both the UI of the modal and the screen behind it are visible to XCUI and thus are scanned.

    • @lukepurcell
      @lukepurcell 2 роки тому +2

      @@stephaniebogart4852couldn’t thank you enough for taking the time to write all this out. I have a meeting with a hiring manager for a junior QA role soon and am cramming to get as knowledgeable as possible. I’m having trouble finding to the point info like this

    • @otniel2663
      @otniel2663 Рік тому

      @@stephaniebogart4852any books or channel recommended about concepts that you said above? I interested about UIT whitebox testing vs blackbox testing vs Unit test

  • @daniladergachev
    @daniladergachev 11 місяців тому

    Wouldn't it fail anyway when you try to tap something that doesn't exist? I thought it only makes sense to assert if something exists if you are not interacting with it, otherwise it's redundant? Please correct me if I'm wrong

  • @brentmifsud6181
    @brentmifsud6181 Рік тому

    is there a way to start the recorder later on in the test?
    Like for example, let's say I made a reusable series of steps that logs the user into the app. And I want to start recording after the user has logged in.

  • @johny_freeman
    @johny_freeman 2 роки тому +3

    Hello. I want to thank you for your content, I've learnt a lot from you. And in addition, I have an idea for a video. I think it would be great if you break down how to restore UI state after terminating an app. I think so because there's a lack of videos on this topic, especially for Scene based application, hence for iOS 13+.
    So if you had a free time for this, I assume a video about such advanced topic would be appreciated.

  • @dakiniwhite
    @dakiniwhite 2 роки тому

    this feature - to record the steps you make and to transform them in lines code - is available in appium too? thanks

  • @MarkizBoneco
    @MarkizBoneco Рік тому

    Tank you for v very useful video! Use it in every project!

  • @abdorizak
    @abdorizak 2 роки тому +1

    It's same when I'm calling api when i tap login shoul i write real username and password to check unit testing

  • @pavunraj2449
    @pavunraj2449 2 роки тому +1

    thank you , keep posting.

  • @nicolegambini2273
    @nicolegambini2273 2 роки тому +1

    I love it

  • @thumbs1upsidedown
    @thumbs1upsidedown 2 роки тому

    Nice video 👍 I really like the way you explain things. Your voice and style is enjoyable.
    Could you dig deeper in the topic you mentioned around 9:50, in particular Expectation and async testing.

  • @mertkaradeniz8884
    @mertkaradeniz8884 2 роки тому

    Nice video, could you make unit tests tutorial in VIPER project.

  • @faastfood
    @faastfood 2 роки тому +1

    I would love to watch more detail video on UI and unit test cases writing.

  • @ignaciovela8065
    @ignaciovela8065 Рік тому

    Great video! Incredible simple. Thanks!

  • @storymcc4340
    @storymcc4340 2 роки тому +1

    cool! i like it

  • @georgereynolds338
    @georgereynolds338 Рік тому

    brilliant

  • @manni7317
    @manni7317 2 роки тому +1

    amazing

  • @AmitBiswastunebox
    @AmitBiswastunebox 2 роки тому

    Hi Afraz nice video bro. Also when you get chance please do a Unit Testing tutorial in MVVM project like a pro. U r amazing

  • @victorriurean
    @victorriurean 2 роки тому +1

    🔥🔥🔥

  • @markcuello5
    @markcuello5 2 роки тому +1

    HELP

  • @apparte462
    @apparte462 Рік тому

    Waste of TIME