How to write Integration Tests in Flutter like no other, using the Robot Pattern

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

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

  • @AbdulBari-jh8lj
    @AbdulBari-jh8lj Год назад +1

    Simple and to the point demonstration without any time waste, simple awesome. Would love to know if there is any way to achieve native UI communication like allowing notification/location permissions or connect to a WiFi network etc.

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

      Hi there,
      Thanks for the comment!
      Would you like to explain more about "native communication for location permissions or connecting to a WiFi network"?

    • @AbdulBari-jh8lj
      @AbdulBari-jh8lj Год назад

      Native communication like if I have to allow GPS permission and the native iOS or Android GPS permission dialog appears, then how can I provide the permission through the integration test? And same goes for the WiFi network connection, if I want to connect to a Wifi network then how can I connect from the phone settings using the integration test? or is that even possible
      @@runtimesnippets

  • @thabasumm1868
    @thabasumm1868 11 месяцев назад

    What if i have 2 files to execute after login? Can i do simply in one main method by calling the file names and without uninstalling the app after login?

    • @runtimesnippets
      @runtimesnippets  10 месяцев назад

      as I understand, you have two files with integration tests, you can both by running "flutter test integration_test" and it will run all the integration tests that are inside the integration_test directory

  • @laugedyret
    @laugedyret 8 месяцев назад

    Thanks for a great video!
    I find that my tests work when I run them locally, but when I try to get my app approved in the Google Play Console, I can see from the short test videos that their robot can't find my fields for email and password. Have you experienced the same thing?

    • @runtimesnippets
      @runtimesnippets  8 месяцев назад +1

      This requires a bit of debugging. For example, which device is the test emulated on? Run the tests on that device locally inside your flutter project and see if it gives the same error. Mostly if the device height is too small, or the content is overflowing, the robot won’t be able to detect those fields.
      These integration tests are different from the ones that Google runs. But the idea for debugging is the same. Hope it helps!

    • @laugedyret
      @laugedyret 8 месяцев назад

      @@runtimesnippets Thank you!

  • @muhammadfarooqzahid
    @muhammadfarooqzahid 4 месяца назад +1

    Ahh I've to write more code now

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

    very nice, very nice

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

      Thankyou! If you like the content, please subscribe. It helps us stay motivated and keep pushing out new tutorials.

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

    awesome